|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.activemq.broker.region.cursors.AbstractPendingMessageCursor
public abstract class AbstractPendingMessageCursor
Abstract method holder for pending message (messages awaiting disptach to a consumer) cursor
| Field Summary | |
|---|---|
protected ActiveMQMessageAudit |
audit
|
protected boolean |
enableAudit
|
protected MessageReference |
last
|
protected int |
maxAuditDepth
|
protected int |
maxBatchSize
|
protected int |
maxProducersToAudit
|
protected int |
memoryUsageHighWaterMark
|
protected boolean |
prioritizedMessages
|
protected SystemUsage |
systemUsage
|
protected boolean |
useCache
|
| Constructor Summary | |
|---|---|
AbstractPendingMessageCursor(boolean prioritizedMessages)
|
|
| Method Summary | |
|---|---|
void |
add(ConnectionContext context,
Destination destination)
Add a destination |
void |
addMessageFirst(MessageReference node)
add message to await dispatch |
void |
addMessageLast(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 |
destroy()
destroy the cursor |
protected void |
fillBatch()
|
void |
gc()
free up any internal buffers |
int |
getMaxAuditDepth()
|
int |
getMaxBatchSize()
|
int |
getMaxProducersToAudit()
|
int |
getMemoryUsageHighWaterMark()
|
ActiveMQMessageAudit |
getMessageAudit()
|
SystemUsage |
getSystemUsage()
|
boolean |
hasMessagesBufferedToDeliver()
|
boolean |
hasNext()
|
boolean |
hasSpace()
|
boolean |
isCacheEnabled()
|
boolean |
isDuplicate(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. |
protected boolean |
isStarted()
|
boolean |
isTransient()
|
boolean |
isUseCache()
|
MessageReference |
next()
|
LinkedList<MessageReference> |
pageInList(int maxItems)
Page in a restricted number of messages |
boolean |
recordUniqueId(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<MessageReference> |
remove(ConnectionContext context,
Destination destination)
remove a destination |
void |
remove(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(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(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(MessageReference node,
long maxWaitTime)
add message to await dispatch - if it can |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected int memoryUsageHighWaterMark
protected int maxBatchSize
protected SystemUsage systemUsage
protected int maxProducersToAudit
protected int maxAuditDepth
protected boolean enableAudit
protected ActiveMQMessageAudit audit
protected boolean useCache
protected MessageReference last
protected final boolean prioritizedMessages
| Constructor Detail |
|---|
public AbstractPendingMessageCursor(boolean prioritizedMessages)
| Method Detail |
|---|
public void start()
throws Exception
start in interface ServiceException
public void stop()
throws Exception
stop in interface ServiceException
public void add(ConnectionContext context,
Destination destination)
throws Exception
PendingMessageCursor
add in interface PendingMessageCursorException
public List<MessageReference> remove(ConnectionContext context,
Destination destination)
throws Exception
PendingMessageCursor
remove in interface PendingMessageCursorExceptionpublic boolean isRecoveryRequired()
PendingMessageCursor
isRecoveryRequired in interface PendingMessageCursor
public void addMessageFirst(MessageReference node)
throws Exception
PendingMessageCursor
addMessageFirst in interface PendingMessageCursorException
public void addMessageLast(MessageReference node)
throws Exception
PendingMessageCursor
addMessageLast in interface PendingMessageCursorIOException
Exception
public boolean tryAddMessageLast(MessageReference node,
long maxWaitTime)
throws Exception
PendingMessageCursor
tryAddMessageLast in interface PendingMessageCursorIOException
Exception
public void addRecoveredMessage(MessageReference node)
throws Exception
PendingMessageCursor
addRecoveredMessage in interface PendingMessageCursorExceptionpublic void clear()
PendingMessageCursor
clear in interface PendingMessageCursorpublic boolean hasNext()
hasNext in interface PendingMessageCursorpublic boolean isEmpty()
isEmpty in interface PendingMessageCursorpublic boolean isEmpty(Destination destination)
PendingMessageCursor
isEmpty in interface PendingMessageCursorpublic MessageReference next()
next in interface PendingMessageCursorpublic void remove()
PendingMessageCursor
remove in interface PendingMessageCursorpublic void reset()
PendingMessageCursor
reset in interface PendingMessageCursorpublic int size()
size in interface PendingMessageCursorpublic int getMaxBatchSize()
getMaxBatchSize in interface PendingMessageCursorpublic void setMaxBatchSize(int maxBatchSize)
PendingMessageCursor
setMaxBatchSize in interface PendingMessageCursor
protected void fillBatch()
throws Exception
Exceptionpublic void resetForGC()
PendingMessageCursor
resetForGC in interface PendingMessageCursorpublic void remove(MessageReference node)
PendingMessageCursor
remove in interface PendingMessageCursorpublic void gc()
PendingMessageCursor
gc in interface PendingMessageCursorpublic void setSystemUsage(SystemUsage usageManager)
PendingMessageCursor
setSystemUsage in interface PendingMessageCursorSystemUsagepublic boolean hasSpace()
hasSpace in interface PendingMessageCursorpublic boolean isFull()
isFull in interface PendingMessageCursorpublic void release()
PendingMessageCursor
release 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 PendingMessageCursor
public void destroy()
throws Exception
destroy in interface PendingMessageCursorExceptionpublic LinkedList<MessageReference> pageInList(int maxItems)
pageInList in interface PendingMessageCursormaxItems - maximum number of messages to return
public int getMaxProducersToAudit()
getMaxProducersToAudit in interface PendingMessageCursorpublic void setMaxProducersToAudit(int maxProducersToAudit)
PendingMessageCursor
setMaxProducersToAudit in interface PendingMessageCursormaxProducersToAudit - the maxProducersToAudit to setpublic int getMaxAuditDepth()
getMaxAuditDepth in interface PendingMessageCursorpublic void setMaxAuditDepth(int maxAuditDepth)
PendingMessageCursor
setMaxAuditDepth 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(ActiveMQMessageAudit audit)
setMessageAudit in interface PendingMessageCursoraudit - new audit componentpublic ActiveMQMessageAudit getMessageAudit()
getMessageAudit in interface PendingMessageCursorpublic boolean isUseCache()
isUseCache in interface PendingMessageCursorpublic void setUseCache(boolean useCache)
PendingMessageCursor
setUseCache in interface PendingMessageCursorpublic boolean isDuplicate(MessageId messageId)
public boolean recordUniqueId(MessageId messageId)
messageId -
public void rollback(MessageId id)
PendingMessageCursor
rollback in interface PendingMessageCursorprotected boolean isStarted()
public static boolean isPrioritizedMessageSubscriber(Broker broker,
Subscription sub)
public boolean isCacheEnabled()
isCacheEnabled in interface PendingMessageCursorpublic void setCacheEnabled(boolean val)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||