public abstract class AbstractStoreCursor extends AbstractPendingMessageCursor implements MessageRecoveryListener
Modifier and Type | Field and Description |
---|---|
protected PendingList |
batchList |
protected boolean |
batchResetNeeded |
protected boolean |
hadSpace |
protected Destination |
regionDestination |
protected int |
size |
audit, cacheEnabled, enableAudit, last, maxAuditDepth, maxBatchSize, maxProducersToAudit, memoryUsageHighWaterMark, prioritizedMessages, systemUsage, useCache
Modifier | Constructor and Description |
---|---|
protected |
AbstractStoreCursor(Destination destination) |
Modifier and Type | Method and Description |
---|---|
void |
addMessageFirst(MessageReference node)
add message to await dispatch
|
boolean |
addMessageLast(MessageReference node)
add message to await dispatch
|
protected boolean |
canEnableCash() |
void |
clear()
clear all pending messages
|
protected abstract void |
doFillBatch() |
protected boolean |
duplicateFromStoreExcepted(Message message) |
protected boolean |
enableCacheNow() |
protected void |
fillBatch() |
void |
finished() |
void |
gc()
free up any internal buffers
|
protected abstract int |
getStoreSize() |
Subscription |
getSubscription() |
static boolean |
gotToTheStore(Message message) |
boolean |
hasMessagesBufferedToDeliver() |
boolean |
hasNext() |
boolean |
isCacheEnabled() |
boolean |
isEmpty() |
protected abstract boolean |
isStoreEmpty() |
MessageReference |
next() |
void |
rebase() |
boolean |
recoverMessage(Message message) |
boolean |
recoverMessage(Message message,
boolean cached) |
void |
release()
hint to the cursor to release any locks it might have grabbed after a
reset
|
void |
remove()
remove the message at the cursor position
|
void |
remove(MessageReference node)
remove a node
|
void |
reset()
reset the cursor
|
protected abstract void |
resetBatch() |
protected void |
resetSize() |
protected void |
setBatch(MessageId messageId) |
int |
size() |
void |
start() |
void |
stop() |
String |
toString() |
add, addRecoveredMessage, destroy, getMaxAuditDepth, getMaxBatchSize, getMaxProducersToAudit, getMemoryUsageHighWaterMark, getMessageAudit, getSystemUsage, hasSpace, isDuplicate, isEmpty, isEnableAudit, isFull, isPrioritizedMessageSubscriber, isRecoveryRequired, isStarted, isTransient, isUseCache, pageInList, recordUniqueId, remove, resetForGC, rollback, setCacheEnabled, setEnableAudit, setMaxAuditDepth, setMaxBatchSize, setMaxProducersToAudit, setMemoryUsageHighWaterMark, setMessageAudit, setSystemUsage, setUseCache, tryAddMessageLast
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
hasSpace, isDuplicate, recoverMessageReference
protected final Destination regionDestination
protected final PendingList batchList
protected boolean batchResetNeeded
protected int size
protected boolean hadSpace
protected AbstractStoreCursor(Destination destination)
public final void start() throws Exception
start
in interface Service
start
in class AbstractPendingMessageCursor
Exception
protected void resetSize()
public void rebase()
rebase
in interface PendingMessageCursor
rebase
in class AbstractPendingMessageCursor
public final void stop() throws Exception
stop
in interface Service
stop
in class AbstractPendingMessageCursor
Exception
public final boolean recoverMessage(Message message) throws Exception
recoverMessage
in interface MessageRecoveryListener
Exception
public boolean recoverMessage(Message message, boolean cached) throws Exception
Exception
protected boolean duplicateFromStoreExcepted(Message message)
public static boolean gotToTheStore(Message message) throws Exception
Exception
public final void reset()
PendingMessageCursor
reset
in interface PendingMessageCursor
reset
in class AbstractPendingMessageCursor
public void release()
PendingMessageCursor
release
in interface PendingMessageCursor
release
in class AbstractPendingMessageCursor
public final void finished()
public final boolean hasNext()
hasNext
in interface PendingMessageCursor
hasNext
in class AbstractPendingMessageCursor
public final MessageReference next()
next
in interface PendingMessageCursor
next
in class AbstractPendingMessageCursor
public boolean addMessageLast(MessageReference node) throws Exception
PendingMessageCursor
addMessageLast
in interface PendingMessageCursor
addMessageLast
in class AbstractPendingMessageCursor
IOException
Exception
public boolean isCacheEnabled()
isCacheEnabled
in interface PendingMessageCursor
isCacheEnabled
in class AbstractPendingMessageCursor
protected boolean enableCacheNow()
protected boolean canEnableCash()
public void addMessageFirst(MessageReference node) throws Exception
PendingMessageCursor
addMessageFirst
in interface PendingMessageCursor
addMessageFirst
in class AbstractPendingMessageCursor
Exception
public final void remove()
PendingMessageCursor
remove
in interface PendingMessageCursor
remove
in class AbstractPendingMessageCursor
public final void remove(MessageReference node)
PendingMessageCursor
remove
in interface PendingMessageCursor
remove
in class AbstractPendingMessageCursor
public final void clear()
PendingMessageCursor
clear
in interface PendingMessageCursor
clear
in class AbstractPendingMessageCursor
public void gc()
PendingMessageCursor
gc
in interface PendingMessageCursor
gc
in class AbstractPendingMessageCursor
protected final void fillBatch()
fillBatch
in class AbstractPendingMessageCursor
public final boolean isEmpty()
isEmpty
in interface PendingMessageCursor
isEmpty
in class AbstractPendingMessageCursor
public final boolean hasMessagesBufferedToDeliver()
hasMessagesBufferedToDeliver
in interface PendingMessageCursor
hasMessagesBufferedToDeliver
in class AbstractPendingMessageCursor
public final int size()
size
in interface PendingMessageCursor
size
in class AbstractPendingMessageCursor
protected abstract void doFillBatch() throws Exception
Exception
protected abstract void resetBatch()
protected abstract int getStoreSize()
protected abstract boolean isStoreEmpty()
public Subscription getSubscription()
Copyright © 2005–2019 FuseSource, Corp.. All rights reserved.