public class KahaReferenceStore extends AbstractMessageStore implements ReferenceStore
ReferenceStore.ReferenceData| Modifier and Type | Field and Description |
|---|---|
protected KahaReferenceStoreAdapter |
adapter |
protected ActiveMQMessageAudit |
dispatchAudit |
protected java.util.concurrent.locks.Lock |
lock |
protected MapContainer<MessageId,ReferenceRecord> |
messageContainer |
destination, FUTURE, prioritizedMessages| Constructor and Description |
|---|
KahaReferenceStore(KahaReferenceStoreAdapter adapter,
MapContainer<MessageId,ReferenceRecord> container,
ActiveMQDestination destination) |
| Modifier and Type | Method and Description |
|---|---|
void |
addMessage(ConnectionContext context,
Message message)
Adds a message to the message store
|
boolean |
addMessageReference(ConnectionContext context,
MessageId messageId,
ReferenceStore.ReferenceData data)
Adds a message reference to the message store
|
void |
delete() |
void |
dispose(ConnectionContext context) |
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) |
ReferenceStore.ReferenceData |
getMessageReference(MessageId identity)
Looks up a message using either the String messageID or the
messageNumber.
|
java.util.concurrent.locks.Lock |
getStoreLock() |
protected boolean |
isDuplicate(MessageId messageId) |
boolean |
isSupportForCursors() |
void |
recover(MessageRecoveryListener listener)
Recover any messages to be delivered.
|
void |
recoverNextMessages(int maxReturned,
MessageRecoveryListener listener) |
protected boolean |
recoverReference(MessageRecoveryListener listener,
ReferenceRecord record) |
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 |
resetBatching()
A hint to the Store to reset any batching state for the Destination
|
void |
setBatch(MessageId startAfter)
allow caching cursors to set the current batch offset when cache is exhausted
|
boolean |
supportsExternalBatchControl() |
addMessage, asyncAddQueueMessage, asyncAddQueueMessage, asyncAddTopicMessage, asyncAddTopicMessage, getDestination, isEmpty, isPrioritizedMessages, removeAsyncMessage, setMemoryUsage, setPrioritizedMessages, start, stopclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddMessage, asyncAddQueueMessage, asyncAddQueueMessage, asyncAddTopicMessage, asyncAddTopicMessage, getDestination, isEmpty, isPrioritizedMessages, removeAsyncMessage, setMemoryUsage, setPrioritizedMessagesprotected final MapContainer<MessageId,ReferenceRecord> messageContainer
protected KahaReferenceStoreAdapter adapter
protected ActiveMQMessageAudit dispatchAudit
protected final java.util.concurrent.locks.Lock lock
public KahaReferenceStore(KahaReferenceStoreAdapter adapter, MapContainer<MessageId,ReferenceRecord> container, ActiveMQDestination destination) throws java.io.IOException
java.io.IOExceptionpublic java.util.concurrent.locks.Lock getStoreLock()
getStoreLock in interface ReferenceStorepublic void dispose(ConnectionContext context)
dispose in interface MessageStoredispose in class AbstractMessageStoreprotected MessageId getMessageId(java.lang.Object object)
public void addMessage(ConnectionContext context, Message message) throws java.io.IOException
MessageStoreaddMessage in interface MessageStorecontext - contextjava.io.IOExceptionpublic Message getMessage(MessageId identity) throws java.io.IOException
MessageStoregetMessage in interface MessageStoreidentity - which contains either the messageID or the messageNumberjava.io.IOExceptionprotected final boolean recoverReference(MessageRecoveryListener listener, ReferenceRecord record) throws java.lang.Exception
java.lang.Exceptionpublic void recover(MessageRecoveryListener listener) throws java.lang.Exception
MessageStorerecover in interface MessageStorejava.lang.Exceptionpublic void recoverNextMessages(int maxReturned, MessageRecoveryListener listener) throws java.lang.Exception
recoverNextMessages in interface MessageStorejava.lang.Exceptionpublic boolean addMessageReference(ConnectionContext context, MessageId messageId, ReferenceStore.ReferenceData data) throws java.io.IOException
ReferenceStoreaddMessageReference in interface ReferenceStorejava.io.IOExceptionprotected boolean isDuplicate(MessageId messageId)
public ReferenceStore.ReferenceData getMessageReference(MessageId identity) throws java.io.IOException
ReferenceStoregetMessageReference in interface ReferenceStorejava.io.IOExceptionpublic void removeMessage(ConnectionContext context, MessageAck ack) throws java.io.IOException
MessageStoreremoveMessage in interface 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 removeAllMessages(ConnectionContext context) throws java.io.IOException
MessageStoreremoveAllMessages in interface MessageStorejava.io.IOExceptionpublic void delete()
public void resetBatching()
MessageStoreresetBatching in interface MessageStorepublic int getMessageCount()
getMessageCount in interface MessageStorepublic boolean isSupportForCursors()
public boolean supportsExternalBatchControl()
supportsExternalBatchControl in interface ReferenceStorepublic void setBatch(MessageId startAfter)
MessageStoresetBatch in interface MessageStoresetBatch in interface ReferenceStoresetBatch in class AbstractMessageStorestartAfter - ReferenceStore.setBatch(org.apache.activemq.command.MessageId)Copyright © 2005-2012. All Rights Reserved.