public class StoreDurableSubscriberCursor extends AbstractPendingMessageCursor
audit, enableAudit, last, maxAuditDepth, maxBatchSize, maxProducersToAudit, memoryUsageHighWaterMark, prioritizedMessages, systemUsage, useCache
INFINITE_WAIT
Constructor and Description |
---|
StoreDurableSubscriberCursor(Broker broker,
String clientId,
String subscriberName,
int maxBatchSize,
DurableTopicSubscription subscription) |
Modifier and Type | Method and Description |
---|---|
void |
add(ConnectionContext context,
Destination destination)
Add a destination
|
void |
addMessageFirst(MessageReference node)
add message to await dispatch
|
void |
addRecoveredMessage(MessageReference node)
Add a message recovered from a retroactive policy
|
void |
clear()
clear all pending messages
|
void |
gc()
free up any internal buffers
|
protected PendingMessageCursor |
getNextCursor() |
boolean |
hasNext() |
boolean |
isEmpty() |
boolean |
isEmpty(Destination destination)
check if a Destination is Empty for this cursor
|
boolean |
isImmediatePriorityDispatch() |
boolean |
isRecoveryRequired()
Informs the Broker if the subscription needs to intervention to recover
it's state e.g.
|
boolean |
isTransient() |
long |
messageSize() |
MessageReference |
next() |
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
|
List<MessageReference> |
remove(ConnectionContext context,
Destination destination)
remove a destination
|
void |
remove(MessageReference node)
remove a node
|
void |
reset()
reset the cursor
|
void |
setEnableAudit(boolean enableAudit) |
void |
setImmediatePriorityDispatch(boolean immediatePriorityDispatch) |
void |
setMaxAuditDepth(int maxAuditDepth)
Set the maximum depth of message ids to track
|
void |
setMaxBatchSize(int newMaxBatchSize)
Set the max batch size
|
void |
setMaxProducersToAudit(int maxProducersToAudit)
set the maximum number of producers to track at one time
|
void |
setMemoryUsageHighWaterMark(int memoryUsageHighWaterMark) |
void |
setSystemUsage(SystemUsage usageManager)
Set the UsageManager
|
void |
setUseCache(boolean useCache)
use a cache to improve performance
|
int |
size() |
void |
start() |
void |
stop() |
String |
toString() |
boolean |
tryAddMessageLast(MessageReference node,
long wait)
add message to await dispatch - if it can
|
addMessageLast, destroy, fillBatch, getMaxAuditDepth, getMaxBatchSize, getMaxProducersToAudit, getMemoryUsageHighWaterMark, getMessageAudit, getSystemUsage, hasMessagesBufferedToDeliver, hasSpace, isCacheEnabled, isDuplicate, isEnableAudit, isFull, isPrioritizedMessageSubscriber, isStarted, isUseCache, pageInList, rebase, recordUniqueId, resetForGC, rollback, setCacheEnabled, setMessageAudit
public StoreDurableSubscriberCursor(Broker broker, String clientId, String subscriberName, int maxBatchSize, DurableTopicSubscription subscription)
broker
- Broker for this cursorclientId
- clientId for this cursorsubscriberName
- subscriber name for this cursormaxBatchSize
- currently ignoredsubscription
- subscription for this cursorpublic void start() throws Exception
start
in interface Service
start
in class AbstractPendingMessageCursor
Exception
public void stop() throws Exception
stop
in interface Service
stop
in class AbstractPendingMessageCursor
Exception
public void add(ConnectionContext context, Destination destination) throws Exception
add
in interface PendingMessageCursor
add
in class AbstractPendingMessageCursor
context
- destination
- Exception
public List<MessageReference> remove(ConnectionContext context, Destination destination) throws Exception
remove
in interface PendingMessageCursor
remove
in class AbstractPendingMessageCursor
context
- destination
- Exception
public boolean isEmpty()
isEmpty
in interface PendingMessageCursor
isEmpty
in class AbstractPendingMessageCursor
public boolean isEmpty(Destination destination)
PendingMessageCursor
isEmpty
in interface PendingMessageCursor
isEmpty
in class AbstractPendingMessageCursor
public boolean isRecoveryRequired()
isRecoveryRequired
in interface PendingMessageCursor
isRecoveryRequired
in class AbstractPendingMessageCursor
AbstractPendingMessageCursor
public boolean tryAddMessageLast(MessageReference node, long wait) throws Exception
PendingMessageCursor
tryAddMessageLast
in interface PendingMessageCursor
tryAddMessageLast
in class AbstractPendingMessageCursor
IOException
Exception
public boolean isTransient()
isTransient
in interface PendingMessageCursor
isTransient
in class AbstractPendingMessageCursor
public void addMessageFirst(MessageReference node) throws Exception
PendingMessageCursor
addMessageFirst
in interface PendingMessageCursor
addMessageFirst
in class AbstractPendingMessageCursor
Exception
public void addRecoveredMessage(MessageReference node) throws Exception
PendingMessageCursor
addRecoveredMessage
in interface PendingMessageCursor
addRecoveredMessage
in class AbstractPendingMessageCursor
Exception
public void clear()
PendingMessageCursor
clear
in interface PendingMessageCursor
clear
in class AbstractPendingMessageCursor
public boolean hasNext()
hasNext
in interface PendingMessageCursor
hasNext
in class AbstractPendingMessageCursor
public MessageReference next()
next
in interface PendingMessageCursor
next
in class AbstractPendingMessageCursor
public void remove()
PendingMessageCursor
remove
in interface PendingMessageCursor
remove
in class AbstractPendingMessageCursor
public void remove(MessageReference node)
PendingMessageCursor
remove
in interface PendingMessageCursor
remove
in class AbstractPendingMessageCursor
public void reset()
PendingMessageCursor
reset
in interface PendingMessageCursor
reset
in class AbstractPendingMessageCursor
public void release()
PendingMessageCursor
release
in interface PendingMessageCursor
release
in class AbstractPendingMessageCursor
public int size()
size
in interface PendingMessageCursor
size
in class AbstractPendingMessageCursor
public long messageSize()
public void setMaxBatchSize(int newMaxBatchSize)
PendingMessageCursor
setMaxBatchSize
in interface PendingMessageCursor
setMaxBatchSize
in class AbstractPendingMessageCursor
public void gc()
PendingMessageCursor
gc
in interface PendingMessageCursor
gc
in class AbstractPendingMessageCursor
public void setSystemUsage(SystemUsage usageManager)
PendingMessageCursor
setSystemUsage
in interface PendingMessageCursor
setSystemUsage
in class AbstractPendingMessageCursor
SystemUsage
public void setMemoryUsageHighWaterMark(int memoryUsageHighWaterMark)
setMemoryUsageHighWaterMark
in interface PendingMessageCursor
setMemoryUsageHighWaterMark
in class AbstractPendingMessageCursor
memoryUsageHighWaterMark
- the memoryUsageHighWaterMark to setpublic void setMaxProducersToAudit(int maxProducersToAudit)
PendingMessageCursor
setMaxProducersToAudit
in interface PendingMessageCursor
setMaxProducersToAudit
in class AbstractPendingMessageCursor
maxProducersToAudit
- the maxProducersToAudit to setpublic void setMaxAuditDepth(int maxAuditDepth)
PendingMessageCursor
setMaxAuditDepth
in interface PendingMessageCursor
setMaxAuditDepth
in class AbstractPendingMessageCursor
maxAuditDepth
- the maxAuditDepth to setpublic void setEnableAudit(boolean enableAudit)
setEnableAudit
in interface PendingMessageCursor
setEnableAudit
in class AbstractPendingMessageCursor
enableAudit
- the enableAudit to setpublic void setUseCache(boolean useCache)
PendingMessageCursor
setUseCache
in interface PendingMessageCursor
setUseCache
in class AbstractPendingMessageCursor
protected PendingMessageCursor getNextCursor() throws Exception
Exception
public boolean isImmediatePriorityDispatch()
public void setImmediatePriorityDispatch(boolean immediatePriorityDispatch)
Copyright © 2005–2019 The Apache Software Foundation. All rights reserved.