|
||||||||||
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 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 SystemUsage |
systemUsage
|
protected boolean |
useCache
|
Constructor Summary | |
---|---|
AbstractPendingMessageCursor()
|
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 |
isDuplicate(MessageId messageId)
|
boolean |
isEmpty()
|
boolean |
isEmpty(Destination destination)
check if a Destination is Empty for this cursor |
boolean |
isEnableAudit()
|
boolean |
isFull()
|
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 |
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()
|
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
Constructor Detail |
---|
public AbstractPendingMessageCursor()
Method Detail |
---|
public void start() throws Exception
start
in interface Service
Exception
public void stop() throws Exception
stop
in interface Service
Exception
public void add(ConnectionContext context, Destination destination) throws Exception
PendingMessageCursor
add
in interface PendingMessageCursor
Exception
public List<MessageReference> remove(ConnectionContext context, Destination destination) throws Exception
PendingMessageCursor
remove
in interface PendingMessageCursor
Exception
public boolean isRecoveryRequired()
PendingMessageCursor
isRecoveryRequired
in interface PendingMessageCursor
public void addMessageFirst(MessageReference node) throws Exception
PendingMessageCursor
addMessageFirst
in interface PendingMessageCursor
Exception
public void addMessageLast(MessageReference node) throws Exception
PendingMessageCursor
addMessageLast
in interface PendingMessageCursor
IOException
Exception
public void addRecoveredMessage(MessageReference node) throws Exception
PendingMessageCursor
addRecoveredMessage
in interface PendingMessageCursor
Exception
public void clear()
PendingMessageCursor
clear
in interface PendingMessageCursor
public boolean hasNext()
hasNext
in interface PendingMessageCursor
public boolean isEmpty()
isEmpty
in interface PendingMessageCursor
public boolean isEmpty(Destination destination)
PendingMessageCursor
isEmpty
in interface PendingMessageCursor
public MessageReference next()
next
in interface PendingMessageCursor
public void remove()
PendingMessageCursor
remove
in interface PendingMessageCursor
public void reset()
PendingMessageCursor
reset
in interface PendingMessageCursor
public int size()
size
in interface PendingMessageCursor
public int getMaxBatchSize()
getMaxBatchSize
in interface PendingMessageCursor
public void setMaxBatchSize(int maxBatchSize)
PendingMessageCursor
setMaxBatchSize
in interface PendingMessageCursor
protected void fillBatch() throws Exception
Exception
public void resetForGC()
PendingMessageCursor
resetForGC
in interface PendingMessageCursor
public void remove(MessageReference node)
PendingMessageCursor
remove
in interface PendingMessageCursor
public void gc()
PendingMessageCursor
gc
in interface PendingMessageCursor
public void setSystemUsage(SystemUsage usageManager)
PendingMessageCursor
setSystemUsage
in interface PendingMessageCursor
SystemUsage
public boolean hasSpace()
hasSpace
in interface PendingMessageCursor
public boolean isFull()
isFull
in interface PendingMessageCursor
public void release()
PendingMessageCursor
release
in interface PendingMessageCursor
public boolean hasMessagesBufferedToDeliver()
hasMessagesBufferedToDeliver
in interface PendingMessageCursor
public int getMemoryUsageHighWaterMark()
getMemoryUsageHighWaterMark
in interface PendingMessageCursor
public void setMemoryUsageHighWaterMark(int memoryUsageHighWaterMark)
setMemoryUsageHighWaterMark
in interface PendingMessageCursor
memoryUsageHighWaterMark
- the memoryUsageHighWaterMark to setpublic SystemUsage getSystemUsage()
getSystemUsage
in interface PendingMessageCursor
public void destroy() throws Exception
destroy
in interface PendingMessageCursor
Exception
public LinkedList<MessageReference> pageInList(int maxItems)
pageInList
in interface PendingMessageCursor
maxItems
- maximum number of messages to return
public int getMaxProducersToAudit()
getMaxProducersToAudit
in interface PendingMessageCursor
public void setMaxProducersToAudit(int maxProducersToAudit)
PendingMessageCursor
setMaxProducersToAudit
in interface PendingMessageCursor
maxProducersToAudit
- the maxProducersToAudit to setpublic int getMaxAuditDepth()
getMaxAuditDepth
in interface PendingMessageCursor
public void setMaxAuditDepth(int maxAuditDepth)
PendingMessageCursor
setMaxAuditDepth
in interface PendingMessageCursor
maxAuditDepth
- the maxAuditDepth to setpublic boolean isEnableAudit()
isEnableAudit
in interface PendingMessageCursor
public void setEnableAudit(boolean enableAudit)
setEnableAudit
in interface PendingMessageCursor
enableAudit
- the enableAudit to setpublic boolean isTransient()
isTransient
in interface PendingMessageCursor
public void setMessageAudit(ActiveMQMessageAudit audit)
setMessageAudit
in interface PendingMessageCursor
audit
- new audit componentpublic ActiveMQMessageAudit getMessageAudit()
getMessageAudit
in interface PendingMessageCursor
public boolean isUseCache()
isUseCache
in interface PendingMessageCursor
public void setUseCache(boolean useCache)
PendingMessageCursor
setUseCache
in interface PendingMessageCursor
public boolean isDuplicate(MessageId messageId)
public boolean recordUniqueId(MessageId messageId)
messageId
-
public void rollback(MessageId id)
PendingMessageCursor
rollback
in interface PendingMessageCursor
protected boolean isStarted()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |