public abstract class AbstractPendingMessageCursor extends Object implements PendingMessageCursor
| Modifier and Type | Field and Description |
|---|---|
protected org.apache.activemq.ActiveMQMessageAudit |
audit |
protected boolean |
enableAudit |
protected org.apache.activemq.broker.region.MessageReference |
last |
protected int |
maxAuditDepth |
protected int |
maxBatchSize |
protected int |
maxProducersToAudit |
protected int |
memoryUsageHighWaterMark |
protected boolean |
prioritizedMessages |
protected SystemUsage |
systemUsage |
protected boolean |
useCache |
INFINITE_WAIT| Constructor and Description |
|---|
AbstractPendingMessageCursor(boolean prioritizedMessages) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(ConnectionContext context,
Destination destination)
Add a destination
|
void |
addMessageFirst(org.apache.activemq.broker.region.MessageReference node)
add message to await dispatch
|
boolean |
addMessageLast(org.apache.activemq.broker.region.MessageReference node)
add message to await dispatch
|
void |
addRecoveredMessage(org.apache.activemq.broker.region.MessageReference node)
Add a message recovered from a retroactive policy
|
void |
clear()
clear all pending messages
|
void |
destroy()
destroy the cursor
|
protected void |
fillBatch() |
void |
gc()
free up any internal buffers
|
int |
getMaxAuditDepth() |
int |
getMaxBatchSize() |
int |
getMaxProducersToAudit() |
int |
getMemoryUsageHighWaterMark() |
org.apache.activemq.ActiveMQMessageAudit |
getMessageAudit() |
SystemUsage |
getSystemUsage() |
boolean |
hasMessagesBufferedToDeliver() |
boolean |
hasNext() |
boolean |
hasSpace() |
boolean |
isCacheEnabled() |
boolean |
isDuplicate(org.apache.activemq.command.MessageId messageId) |
boolean |
isEmpty() |
boolean |
isEmpty(Destination destination)
check if a Destination is Empty for this cursor
|
boolean |
isEnableAudit() |
boolean |
isFull() |
static boolean |
isPrioritizedMessageSubscriber(Broker broker,
Subscription sub) |
boolean |
isRecoveryRequired()
Informs the Broker if the subscription needs to intervention to recover
it's state e.g.
|
boolean |
isStarted() |
boolean |
isTransient() |
boolean |
isUseCache() |
org.apache.activemq.broker.region.MessageReference |
next() |
LinkedList<org.apache.activemq.broker.region.MessageReference> |
pageInList(int maxItems)
Page in a restricted number of messages
|
void |
rebase() |
boolean |
recordUniqueId(org.apache.activemq.command.MessageId messageId)
records a message id and checks if it is a duplicate
|
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<org.apache.activemq.broker.region.MessageReference> |
remove(ConnectionContext context,
Destination destination)
remove a destination
|
void |
remove(org.apache.activemq.broker.region.MessageReference node)
remove a node
|
void |
reset()
reset the cursor
|
void |
resetForGC()
Give the cursor a hint that we are about to remove messages from memory
only
|
void |
rollback(org.apache.activemq.command.MessageId id)
remove from auditing the message id
|
void |
setCacheEnabled(boolean val) |
void |
setEnableAudit(boolean enableAudit) |
void |
setMaxAuditDepth(int maxAuditDepth)
Set the maximum depth of message ids to track
|
void |
setMaxBatchSize(int maxBatchSize)
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 |
setMessageAudit(org.apache.activemq.ActiveMQMessageAudit audit)
set the audit
|
void |
setSystemUsage(SystemUsage usageManager)
Set the UsageManager
|
void |
setUseCache(boolean useCache)
use a cache to improve performance
|
int |
size() |
void |
start() |
void |
stop() |
boolean |
tryAddMessageLast(org.apache.activemq.broker.region.MessageReference node,
long maxWaitTime)
add message to await dispatch - if it can
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitmessageSizeprotected int memoryUsageHighWaterMark
protected int maxBatchSize
protected SystemUsage systemUsage
protected int maxProducersToAudit
protected int maxAuditDepth
protected boolean enableAudit
protected org.apache.activemq.ActiveMQMessageAudit audit
protected boolean useCache
protected org.apache.activemq.broker.region.MessageReference last
protected final boolean prioritizedMessages
public AbstractPendingMessageCursor(boolean prioritizedMessages)
public void start() throws Exception
start in interface org.apache.activemq.ServiceExceptionpublic void stop() throws Exception
stop in interface org.apache.activemq.ServiceExceptionpublic void add(ConnectionContext context, Destination destination) throws Exception
PendingMessageCursoradd in interface PendingMessageCursorExceptionpublic List<org.apache.activemq.broker.region.MessageReference> remove(ConnectionContext context, Destination destination) throws Exception
PendingMessageCursorremove in interface PendingMessageCursorExceptionpublic boolean isRecoveryRequired()
PendingMessageCursorisRecoveryRequired in interface PendingMessageCursorpublic void addMessageFirst(org.apache.activemq.broker.region.MessageReference node) throws Exception
PendingMessageCursoraddMessageFirst in interface PendingMessageCursorExceptionpublic boolean addMessageLast(org.apache.activemq.broker.region.MessageReference node) throws Exception
PendingMessageCursoraddMessageLast in interface PendingMessageCursorIOExceptionExceptionpublic boolean tryAddMessageLast(org.apache.activemq.broker.region.MessageReference node, long maxWaitTime) throws Exception
PendingMessageCursortryAddMessageLast in interface PendingMessageCursorIOExceptionExceptionpublic void addRecoveredMessage(org.apache.activemq.broker.region.MessageReference node) throws Exception
PendingMessageCursoraddRecoveredMessage in interface PendingMessageCursorExceptionpublic void clear()
PendingMessageCursorclear in interface PendingMessageCursorpublic boolean hasNext()
hasNext in interface PendingMessageCursorpublic boolean isEmpty()
isEmpty in interface PendingMessageCursorpublic boolean isEmpty(Destination destination)
PendingMessageCursorisEmpty in interface PendingMessageCursorpublic org.apache.activemq.broker.region.MessageReference next()
next in interface PendingMessageCursorpublic void remove()
PendingMessageCursorremove in interface PendingMessageCursorpublic void reset()
PendingMessageCursorreset in interface PendingMessageCursorpublic int size()
size in interface PendingMessageCursorpublic int getMaxBatchSize()
getMaxBatchSize in interface PendingMessageCursorpublic void setMaxBatchSize(int maxBatchSize)
PendingMessageCursorsetMaxBatchSize in interface PendingMessageCursorpublic void resetForGC()
PendingMessageCursorresetForGC in interface PendingMessageCursorpublic void remove(org.apache.activemq.broker.region.MessageReference node)
PendingMessageCursorremove in interface PendingMessageCursorpublic void gc()
PendingMessageCursorgc in interface PendingMessageCursorpublic void setSystemUsage(SystemUsage usageManager)
PendingMessageCursorsetSystemUsage in interface PendingMessageCursorSystemUsagepublic boolean hasSpace()
hasSpace in interface PendingMessageCursorpublic boolean isFull()
isFull in interface PendingMessageCursorpublic void release()
PendingMessageCursorrelease in interface PendingMessageCursorpublic boolean hasMessagesBufferedToDeliver()
hasMessagesBufferedToDeliver in interface PendingMessageCursorpublic int getMemoryUsageHighWaterMark()
getMemoryUsageHighWaterMark in interface PendingMessageCursorpublic void setMemoryUsageHighWaterMark(int memoryUsageHighWaterMark)
setMemoryUsageHighWaterMark in interface PendingMessageCursormemoryUsageHighWaterMark - the memoryUsageHighWaterMark to setpublic SystemUsage getSystemUsage()
getSystemUsage in interface PendingMessageCursorpublic void destroy() throws Exception
destroy in interface PendingMessageCursorExceptionpublic LinkedList<org.apache.activemq.broker.region.MessageReference> pageInList(int maxItems)
pageInList in interface PendingMessageCursormaxItems - maximum number of messages to returnpublic int getMaxProducersToAudit()
getMaxProducersToAudit in interface PendingMessageCursorpublic void setMaxProducersToAudit(int maxProducersToAudit)
PendingMessageCursorsetMaxProducersToAudit in interface PendingMessageCursormaxProducersToAudit - the maxProducersToAudit to setpublic int getMaxAuditDepth()
getMaxAuditDepth in interface PendingMessageCursorpublic void setMaxAuditDepth(int maxAuditDepth)
PendingMessageCursorsetMaxAuditDepth in interface PendingMessageCursormaxAuditDepth - the maxAuditDepth to setpublic boolean isEnableAudit()
isEnableAudit in interface PendingMessageCursorpublic void setEnableAudit(boolean enableAudit)
setEnableAudit in interface PendingMessageCursorenableAudit - the enableAudit to setpublic boolean isTransient()
isTransient in interface PendingMessageCursorpublic void setMessageAudit(org.apache.activemq.ActiveMQMessageAudit audit)
setMessageAudit in interface PendingMessageCursoraudit - new audit componentpublic org.apache.activemq.ActiveMQMessageAudit getMessageAudit()
getMessageAudit in interface PendingMessageCursorpublic boolean isUseCache()
isUseCache in interface PendingMessageCursorpublic void setUseCache(boolean useCache)
PendingMessageCursorsetUseCache in interface PendingMessageCursorpublic boolean isDuplicate(org.apache.activemq.command.MessageId messageId)
public boolean recordUniqueId(org.apache.activemq.command.MessageId messageId)
messageId - public void rollback(org.apache.activemq.command.MessageId id)
PendingMessageCursorrollback in interface PendingMessageCursorpublic boolean isStarted()
public static boolean isPrioritizedMessageSubscriber(Broker broker, Subscription sub)
public boolean isCacheEnabled()
isCacheEnabled in interface PendingMessageCursorpublic void setCacheEnabled(boolean val)
public void rebase()
rebase in interface PendingMessageCursorCopyright © 2005–2020 The Apache Software Foundation. All rights reserved.