persist pending messages pending message (messages awaiting dispatch to a
consumer) cursor
Method from org.apache.activemq.broker.region.cursors.QueueStorePrefetch Detail: |
protected void doFillBatch() throws Exception {
this.store.recoverNextMessages(this.maxBatchSize, this);
}
|
protected synchronized int getStoreSize() {
try {
int result = this.store.getMessageCount();
return result;
} catch (IOException e) {
LOG.error("Failed to get message count", e);
throw new RuntimeException(e);
}
}
|
protected synchronized boolean isStoreEmpty() {
try {
return this.store.isEmpty();
} catch (Exception e) {
LOG.error("Failed to get message count", e);
throw new RuntimeException(e);
}
}
|
public boolean recoverMessageReference(MessageId messageReference) throws Exception {
Message msg = this.store.getMessage(messageReference);
if (msg != null) {
return recoverMessage(msg);
} else {
String err = "Failed to retrieve message for id: " + messageReference;
LOG.error(err);
throw new IOException(err);
}
}
|
protected void resetBatch() {
this.store.resetBatching();
}
|
protected void setBatch(MessageId messageId) throws Exception {
store.setBatch(messageId);
batchResetNeeded = false;
}
|
public String toString() {
return "QueueStorePrefetch" + System.identityHashCode(this);
}
|