mirror of https://github.com/apache/activemq.git
disable caching of messages for the Queue Cursor
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@615341 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
e16bcf2f48
commit
3249682bda
|
@ -874,15 +874,16 @@ public class Queue extends BaseDestination implements Task {
|
|||
*/
|
||||
public boolean iterate() {
|
||||
|
||||
while (!messagesWaitingForSpace.isEmpty() &&!memoryUsage.isFull()) {
|
||||
Runnable op = messagesWaitingForSpace.removeFirst();
|
||||
op.run();
|
||||
}
|
||||
try {
|
||||
pageInMessages(false);
|
||||
} catch (Exception e) {
|
||||
log.error("Failed to page in more queue messages ", e);
|
||||
}
|
||||
while (!messagesWaitingForSpace.isEmpty() &&!memoryUsage.isFull()) {
|
||||
Runnable op = messagesWaitingForSpace.removeFirst();
|
||||
op.run();
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -109,7 +109,7 @@ class QueueStorePrefetch extends AbstractPendingMessageCursor implements Message
|
|||
|
||||
public synchronized void remove() {
|
||||
size--;
|
||||
if (size==0 && isStarted()) {
|
||||
if (size==0 && isStarted() && cacheEnabled) {
|
||||
cacheEnabled=true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -483,7 +483,7 @@ public class AMQMessageStore implements MessageStore {
|
|||
}
|
||||
|
||||
public void recoverNextMessages(int maxReturned, MessageRecoveryListener listener) throws Exception {
|
||||
|
||||
/*
|
||||
RecoveryListenerAdapter recoveryListener = new RecoveryListenerAdapter(
|
||||
this, listener);
|
||||
if (referenceStore.supportsExternalBatchControl()) {
|
||||
|
@ -510,14 +510,14 @@ public class AMQMessageStore implements MessageStore {
|
|||
flush();
|
||||
referenceStore.recoverNextMessages(maxReturned, recoveryListener);
|
||||
}
|
||||
/*
|
||||
*/
|
||||
RecoveryListenerAdapter recoveryListener = new RecoveryListenerAdapter(this, listener);
|
||||
referenceStore.recoverNextMessages(maxReturned, recoveryListener);
|
||||
if (recoveryListener.size() == 0 && recoveryListener.hasSpace()) {
|
||||
flush();
|
||||
referenceStore.recoverNextMessages(maxReturned, recoveryListener);
|
||||
}
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
Message getMessage(ReferenceData data) throws IOException {
|
||||
|
|
Loading…
Reference in New Issue