public abstract class AbstractMessageStore extends Object implements MessageStore
| Modifier and Type | Field and Description |
|---|---|
protected ActiveMQDestination |
destination |
static ListenableFuture<Object> |
FUTURE |
protected IndexListener |
indexListener |
protected boolean |
prioritizedMessages |
| Constructor and Description |
|---|
AbstractMessageStore(ActiveMQDestination destination) |
| Modifier and Type | Method and Description |
|---|---|
void |
addMessage(ConnectionContext context,
Message message,
boolean canOptimizeHint)
Adds a message to the message store
|
ListenableFuture<Object> |
asyncAddQueueMessage(ConnectionContext context,
Message message)
Adds a message to the message store
|
ListenableFuture<Object> |
asyncAddQueueMessage(ConnectionContext context,
Message message,
boolean canOptimizeHint)
Adds a message to the message store
|
ListenableFuture<Object> |
asyncAddTopicMessage(ConnectionContext context,
Message message)
Adds a message to the message store
|
ListenableFuture<Object> |
asyncAddTopicMessage(ConnectionContext context,
Message message,
boolean canOptimizeHint)
Adds a message to the message store
|
void |
dispose(ConnectionContext context) |
ActiveMQDestination |
getDestination()
The destination that the message store is holding messages for.
|
IndexListener |
getIndexListener() |
boolean |
isEmpty()
flag to indicate if the store is empty
|
boolean |
isPrioritizedMessages() |
void |
registerIndexListener(IndexListener indexListener) |
void |
removeAsyncMessage(ConnectionContext context,
MessageAck ack) |
void |
setBatch(MessageId messageId)
allow caching cursors to set the current batch offset when cache is exhausted
|
void |
setMemoryUsage(MemoryUsage memoryUsage) |
void |
setPrioritizedMessages(boolean prioritizedMessages)
A hint to the store to try recover messages according to priority
|
void |
start() |
void |
stop() |
void |
updateMessage(Message message) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddMessage, getMessage, getMessageCount, recover, recoverNextMessages, removeAllMessages, removeMessage, resetBatchingpublic static final ListenableFuture<Object> FUTURE
protected final ActiveMQDestination destination
protected boolean prioritizedMessages
protected IndexListener indexListener
public AbstractMessageStore(ActiveMQDestination destination)
public void dispose(ConnectionContext context)
dispose in interface MessageStorepublic ActiveMQDestination getDestination()
MessageStoregetDestination in interface MessageStorepublic void setMemoryUsage(MemoryUsage memoryUsage)
setMemoryUsage in interface MessageStorememoryUsage - The SystemUsage that is controlling the
destination's memory usage.public void setBatch(MessageId messageId) throws IOException, Exception
MessageStoresetBatch in interface MessageStoreExceptionIOExceptionpublic boolean isEmpty() throws Exception
isEmpty in interface MessageStoreExceptionpublic void setPrioritizedMessages(boolean prioritizedMessages)
MessageStoresetPrioritizedMessages in interface MessageStorepublic boolean isPrioritizedMessages()
isPrioritizedMessages in interface MessageStorepublic void addMessage(ConnectionContext context, Message message, boolean canOptimizeHint) throws IOException
MessageStoreaddMessage in interface MessageStorecontext - contextcanOptimizeHint - - give a hint to the store that the message may be consumed before it hits the diskIOExceptionpublic ListenableFuture<Object> asyncAddQueueMessage(ConnectionContext context, Message message) throws IOException
MessageStoreasyncAddQueueMessage in interface MessageStorecontext - contextIOExceptionpublic ListenableFuture<Object> asyncAddQueueMessage(ConnectionContext context, Message message, boolean canOptimizeHint) throws IOException
MessageStoreasyncAddQueueMessage in interface MessageStorecontext - contextcanOptimizeHint - - give a hint to the store that the message may be consumed before it hits the diskIOExceptionpublic ListenableFuture<Object> asyncAddTopicMessage(ConnectionContext context, Message message, boolean canOptimizeHint) throws IOException
MessageStoreasyncAddTopicMessage in interface MessageStorecontext - contextcanOptimizeHint - - give a hint to the store that the message may be consumed before it hits the diskIOExceptionpublic ListenableFuture<Object> asyncAddTopicMessage(ConnectionContext context, Message message) throws IOException
MessageStoreasyncAddTopicMessage in interface MessageStorecontext - contextIOExceptionpublic void removeAsyncMessage(ConnectionContext context, MessageAck ack) throws IOException
removeAsyncMessage in interface MessageStoreIOExceptionpublic void updateMessage(Message message) throws IOException
updateMessage in interface MessageStoreIOExceptionpublic void registerIndexListener(IndexListener indexListener)
registerIndexListener in interface MessageStorepublic IndexListener getIndexListener()
Copyright © 2005–2016 FuseSource, Corp.. All rights reserved.