org.apache.activemq.store
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
|
java.util.concurrent.Future<java.lang.Object> |
asyncAddQueueMessage(ConnectionContext context,
Message message)
Adds a message to the message store
|
java.util.concurrent.Future<java.lang.Object> |
asyncAddQueueMessage(ConnectionContext context,
Message message,
boolean canOptimizeHint)
Adds a message to the message store
|
java.util.concurrent.Future<java.lang.Object> |
asyncAddTopicMessage(ConnectionContext context,
Message message)
Adds a message to the message store
|
java.util.concurrent.Future<java.lang.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() |
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 |
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 memoeyUSage) |
void |
setPrioritizedMessages(boolean prioritizedMessages)
A hint to the store to try recover messages according to priority
|
void addMessage(ConnectionContext context, Message message) throws java.io.IOException
context
- contextmessage
- java.io.IOException
void addMessage(ConnectionContext context, Message message, boolean canOptimizeHint) throws java.io.IOException
context
- contextmessage
- canOptimizeHint
- - give a hint to the store that the message may be consumed before it hits the diskjava.io.IOException
java.util.concurrent.Future<java.lang.Object> asyncAddQueueMessage(ConnectionContext context, Message message) throws java.io.IOException
context
- contextmessage
- java.io.IOException
java.io.IOException
java.util.concurrent.Future<java.lang.Object> asyncAddQueueMessage(ConnectionContext context, Message message, boolean canOptimizeHint) throws java.io.IOException
context
- contextmessage
- canOptimizeHint
- - give a hint to the store that the message may be consumed before it hits the diskjava.io.IOException
java.io.IOException
java.util.concurrent.Future<java.lang.Object> asyncAddTopicMessage(ConnectionContext context, Message message) throws java.io.IOException
context
- contextmessage
- java.io.IOException
java.io.IOException
java.util.concurrent.Future<java.lang.Object> asyncAddTopicMessage(ConnectionContext context, Message message, boolean canOptimizeHint) throws java.io.IOException
context
- contextmessage
- canOptimizeHint
- - give a hint to the store that the message may be consumed before it hits the diskjava.io.IOException
java.io.IOException
Message getMessage(MessageId identity) throws java.io.IOException
identity
- which contains either the messageID or the messageNumberjava.io.IOException
void removeMessage(ConnectionContext context, MessageAck ack) throws java.io.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.java.io.IOException
void removeAsyncMessage(ConnectionContext context, MessageAck ack) throws java.io.IOException
java.io.IOException
void removeAllMessages(ConnectionContext context) throws java.io.IOException
context
- java.io.IOException
void recover(MessageRecoveryListener container) throws java.lang.Exception
container
- java.lang.Exception
ActiveMQDestination getDestination()
void setMemoryUsage(MemoryUsage memoeyUSage)
memoeyUSage
- The SystemUsage that is controlling the
destination's memory usage.int getMessageCount() throws java.io.IOException
java.io.IOException
void resetBatching()
void recoverNextMessages(int maxReturned, MessageRecoveryListener listener) throws java.lang.Exception
java.lang.Exception
void dispose(ConnectionContext context)
void setBatch(MessageId messageId) throws java.lang.Exception
messageId
- java.lang.Exception
boolean isEmpty() throws java.lang.Exception
java.lang.Exception
void setPrioritizedMessages(boolean prioritizedMessages)
prioritizedMessages
- boolean isPrioritizedMessages()
Copyright © 2005-2014. All Rights Reserved.