public class MemoryMessageStore extends AbstractMessageStore
MessageStore which
uses a| Modifier and Type | Field and Description |
|---|---|
protected MessageId |
lastBatchId |
protected java.util.Map<MessageId,Message> |
messageTable |
protected long |
sequenceId |
destination, FUTURE, indexListener, prioritizedMessages| Constructor and Description |
|---|
MemoryMessageStore(ActiveMQDestination destination) |
MemoryMessageStore(ActiveMQDestination destination,
java.util.Map<MessageId,Message> messageTable) |
| Modifier and Type | Method and Description |
|---|---|
void |
addMessage(ConnectionContext context,
Message message)
Adds a message to the message store
|
void |
delete() |
Message |
getMessage(MessageId identity)
Looks up a message using either the String messageID or the
messageNumber.
|
int |
getMessageCount() |
void |
recover(MessageRecoveryListener listener)
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 |
removeMessage(ConnectionContext context,
MessageAck ack)
Removes a message from the message store.
|
void |
removeMessage(MessageId msgId) |
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 |
updateMessage(Message message) |
addMessage, asyncAddQueueMessage, asyncAddQueueMessage, asyncAddTopicMessage, asyncAddTopicMessage, dispose, getDestination, getIndexListener, isEmpty, isPrioritizedMessages, registerIndexListener, removeAsyncMessage, setMemoryUsage, setPrioritizedMessages, start, stopprotected MessageId lastBatchId
protected long sequenceId
public MemoryMessageStore(ActiveMQDestination destination)
public MemoryMessageStore(ActiveMQDestination destination, java.util.Map<MessageId,Message> messageTable)
public void addMessage(ConnectionContext context, Message message) throws java.io.IOException
MessageStorecontext - contextjava.io.IOExceptionpublic Message getMessage(MessageId identity) throws java.io.IOException
MessageStoreidentity - which contains either the messageID or the messageNumberjava.io.IOExceptionpublic void removeMessage(ConnectionContext context, MessageAck ack) throws java.io.IOException
MessageStoreack - 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.IOExceptionpublic void removeMessage(MessageId msgId) throws java.io.IOException
java.io.IOExceptionpublic void recover(MessageRecoveryListener listener) throws java.lang.Exception
MessageStorejava.lang.Exceptionpublic void removeAllMessages(ConnectionContext context) throws java.io.IOException
MessageStorejava.io.IOExceptionpublic void delete()
public int getMessageCount()
public void recoverNextMessages(int maxReturned,
MessageRecoveryListener listener)
throws java.lang.Exception
java.lang.Exceptionpublic void resetBatching()
MessageStorepublic void setBatch(MessageId messageId)
MessageStoresetBatch in interface MessageStoresetBatch in class AbstractMessageStorepublic void updateMessage(Message message)
updateMessage in interface MessageStoreupdateMessage in class AbstractMessageStoreCopyright © 2005-2016 Red Hat, Inc.. All Rights Reserved.