public interface MessageStore extends Service
Modifier and Type | Method and Description |
---|---|
void |
addMessage(ConnectionContext context,
Message message)
Adds a message to the message store
|
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.
|
Message |
getMessage(MessageId identity)
Looks up a message using either the String messageID or the
messageNumber.
|
int |
getMessageCount() |
long |
getMessageSize() |
MessageStoreStatistics |
getMessageStoreStatistics() |
boolean |
isEmpty()
flag to indicate if the store is empty
|
boolean |
isPrioritizedMessages() |
void |
recover(MessageRecoveryListener container)
Recover any messages to be delivered.
|
void |
recoverNextMessages(int maxReturned,
MessageRecoveryListener listener) |
void |
registerIndexListener(IndexListener indexListener) |
void |
removeAllMessages(ConnectionContext context)
Removes all the messages from the message store.
|
void |
removeAsyncMessage(ConnectionContext context,
MessageAck ack) |
void |
removeMessage(ConnectionContext context,
MessageAck ack)
Removes a message from the message store.
|
void |
resetBatching()
A hint to the Store to reset any batching state for the Destination
|
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 |
updateMessage(Message message) |
void addMessage(ConnectionContext context, Message message) throws IOException
context
- contextmessage
- IOException
void addMessage(ConnectionContext context, Message message, boolean canOptimizeHint) throws IOException
context
- contextmessage
- canOptimizeHint
- - give a hint to the store that the message may be consumed before it hits the diskIOException
ListenableFuture<Object> asyncAddQueueMessage(ConnectionContext context, Message message) throws IOException
context
- contextmessage
- IOException
IOException
ListenableFuture<Object> asyncAddQueueMessage(ConnectionContext context, Message message, boolean canOptimizeHint) throws IOException
context
- contextmessage
- canOptimizeHint
- - give a hint to the store that the message may be consumed before it hits the diskIOException
IOException
ListenableFuture<Object> asyncAddTopicMessage(ConnectionContext context, Message message) throws IOException
context
- contextmessage
- IOException
IOException
ListenableFuture<Object> asyncAddTopicMessage(ConnectionContext context, Message message, boolean canOptimizeHint) throws IOException
context
- contextmessage
- canOptimizeHint
- - give a hint to the store that the message may be consumed before it hits the diskIOException
IOException
Message getMessage(MessageId identity) throws IOException
identity
- which contains either the messageID or the messageNumberIOException
void removeMessage(ConnectionContext context, MessageAck ack) throws IOException
context
- ack
- the ack request that cause the message to be removed. It
conatins the identity which contains the messageID of the
message that needs to be removed.IOException
void removeAsyncMessage(ConnectionContext context, MessageAck ack) throws IOException
IOException
void removeAllMessages(ConnectionContext context) throws IOException
context
- IOException
void recover(MessageRecoveryListener container) throws Exception
container
- Exception
ActiveMQDestination getDestination()
void setMemoryUsage(MemoryUsage memoryUsage)
memoryUsage
- The SystemUsage that is controlling the
destination's memory usage.int getMessageCount() throws IOException
IOException
long getMessageSize() throws IOException
IOException
MessageStoreStatistics getMessageStoreStatistics()
void resetBatching()
void recoverNextMessages(int maxReturned, MessageRecoveryListener listener) throws Exception
Exception
void dispose(ConnectionContext context)
void setBatch(MessageId messageId) throws Exception
messageId
- Exception
boolean isEmpty() throws Exception
Exception
void setPrioritizedMessages(boolean prioritizedMessages)
prioritizedMessages
- boolean isPrioritizedMessages()
void updateMessage(Message message) throws IOException
IOException
void registerIndexListener(IndexListener indexListener)
Copyright © 2005–2019 The Apache Software Foundation. All rights reserved.