public class KahaMessageStore extends AbstractMessageStore
MessageStore which
uses a JPS Container| Modifier and Type | Field and Description |
|---|---|
protected StoreEntry |
batchEntry |
protected MapContainer<MessageId,Message> |
messageContainer |
destination, FUTURE, prioritizedMessages| Constructor and Description |
|---|
KahaMessageStore(MapContainer<MessageId,Message> container,
ActiveMQDestination destination) |
| Modifier and Type | Method and Description |
|---|---|
void |
addMessage(ConnectionContext context,
Message message)
Adds a message to the message store
|
void |
delete() |
java.lang.Object |
getId() |
Message |
getMessage(MessageId identity)
Looks up a message using either the String messageID or the
messageNumber.
|
int |
getMessageCount() |
protected MessageId |
getMessageId(java.lang.Object object) |
MessageId |
getPreviousMessageIdToDeliver(MessageId id) |
boolean |
isSupportForCursors() |
void |
recover(MessageRecoveryListener listener)
Recover any messages to be delivered.
|
protected boolean |
recoverMessage(MessageRecoveryListener listener,
Message msg) |
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
|
addMessage, asyncAddQueueMessage, asyncAddQueueMessage, asyncAddTopicMessage, asyncAddTopicMessage, dispose, getDestination, isEmpty, isPrioritizedMessages, removeAsyncMessage, setMemoryUsage, setPrioritizedMessages, start, stopprotected final MapContainer<MessageId,Message> messageContainer
protected StoreEntry batchEntry
public KahaMessageStore(MapContainer<MessageId,Message> container, ActiveMQDestination destination) throws java.io.IOException
java.io.IOExceptionprotected MessageId getMessageId(java.lang.Object object)
public java.lang.Object getId()
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.IOExceptionprotected boolean recoverMessage(MessageRecoveryListener listener, Message msg) throws java.lang.Exception
java.lang.Exceptionpublic 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()
MessageStore.getMessageCount()public MessageId getPreviousMessageIdToDeliver(MessageId id) throws java.lang.Exception
id - java.lang.Exceptionorg.apache.activemq.store.MessageStore#getPreviousMessageIdToDeliver(org.apache.activemq.command.MessageId)public void recoverNextMessages(int maxReturned, MessageRecoveryListener listener) throws java.lang.Exception
lastMessageId - maxReturned - listener - java.lang.Exceptionorg.apache.activemq.store.MessageStore#recoverNextMessages(org.apache.activemq.command.MessageId,
int, org.apache.activemq.store.MessageRecoveryListener)public void resetBatching()
MessageStorenextToDispatch - org.apache.activemq.store.MessageStore#resetBatching(org.apache.activemq.command.MessageId)public boolean isSupportForCursors()
public void setBatch(MessageId messageId)
MessageStoresetBatch in interface MessageStoresetBatch in class AbstractMessageStoreCopyright © 2005-2012. All Rights Reserved.