mirror of https://github.com/apache/activemq.git
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@605940 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
de14440109
commit
1d7b88431a
|
@ -115,7 +115,7 @@ public abstract class AbstractSubscription implements Subscription {
|
|||
}
|
||||
|
||||
public boolean isSlave() {
|
||||
return getContext().isSlave();
|
||||
return broker.getBrokerService().isSlave();
|
||||
}
|
||||
|
||||
public ConnectionContext getContext() {
|
||||
|
|
|
@ -143,9 +143,6 @@ class HashBin {
|
|||
}
|
||||
}
|
||||
if (!replace) {
|
||||
if (low > size()) {
|
||||
LOG.info("SIZE() " + size() + " low = " + low);
|
||||
}
|
||||
addHashEntry(low, newEntry);
|
||||
size++;
|
||||
}
|
||||
|
@ -189,7 +186,6 @@ class HashBin {
|
|||
pageToUse.setPage(hp);
|
||||
offset = 0;
|
||||
} else {
|
||||
|
||||
int count = 0;
|
||||
int countSoFar=0;
|
||||
int pageNo = 0;
|
||||
|
@ -206,10 +202,14 @@ class HashBin {
|
|||
countSoFar += page.size();
|
||||
pageNo++;
|
||||
}
|
||||
while(pageNo >= hashPages.size()) {
|
||||
HashPage hp = hashIndex.createPage(id);
|
||||
addHashPageInfo(hp.getId(), 0);
|
||||
}
|
||||
pageToUse = hashPages.get(pageNo);
|
||||
|
||||
}
|
||||
pageToUse.begin();
|
||||
|
||||
pageToUse.addHashEntry(offset, entry);
|
||||
doOverFlow(index);
|
||||
}
|
||||
|
|
|
@ -62,7 +62,7 @@ public class HashIndex implements Index {
|
|||
private AtomicBoolean loaded = new AtomicBoolean();
|
||||
private LRUCache<Long, HashPage> pageCache;
|
||||
private boolean enablePageCaching=true;
|
||||
private int pageCacheSize = 1;
|
||||
private int pageCacheSize = 10;
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
@ -88,7 +88,7 @@ class HashPageInfo {
|
|||
|
||||
void begin() throws IOException {
|
||||
if (page == null) {
|
||||
page = hashIndex.getFullPage(id);
|
||||
page = hashIndex.lookupPage(id);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue