mirror of https://github.com/apache/activemq.git
AMQ-1962 - ensure size is not calculated on stop after store has shutdown
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@701118 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
b22832e2d8
commit
5d9351846c
|
@ -65,8 +65,8 @@ public abstract class AbstractStoreCursor extends AbstractPendingMessageCursor i
|
|||
public final synchronized void stop() throws Exception {
|
||||
getSystemUsage().getMemoryUsage().removeUsageListener(this);
|
||||
resetBatch();
|
||||
gc();
|
||||
super.stop();
|
||||
gc();
|
||||
}
|
||||
|
||||
|
||||
|
@ -194,7 +194,11 @@ public abstract class AbstractStoreCursor extends AbstractPendingMessageCursor i
|
|||
batchList.clear();
|
||||
batchResetNeeded = true;
|
||||
this.cacheEnabled=false;
|
||||
size = getStoreSize();
|
||||
if (isStarted()) {
|
||||
size = getStoreSize();
|
||||
} else {
|
||||
size = 0;
|
||||
}
|
||||
}
|
||||
|
||||
protected final synchronized void fillBatch() {
|
||||
|
|
|
@ -77,13 +77,13 @@ public class StoreQueueCursor extends AbstractPendingMessageCursor {
|
|||
|
||||
public synchronized void stop() throws Exception {
|
||||
started = false;
|
||||
super.stop();
|
||||
if (nonPersistent != null) {
|
||||
nonPersistent.stop();
|
||||
nonPersistent.gc();
|
||||
}
|
||||
persistent.stop();
|
||||
persistent.gc();
|
||||
super.stop();
|
||||
pendingCount = 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue