|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.activemq.store.AbstractMessageStore
org.apache.activemq.store.kahadaptor.KahaReferenceStore
public class KahaReferenceStore
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.apache.activemq.store.ReferenceStore |
---|
ReferenceStore.ReferenceData |
Field Summary | |
---|---|
protected KahaReferenceStoreAdapter |
adapter
|
protected ActiveMQMessageAudit |
dispatchAudit
|
protected Lock |
lock
|
protected MapContainer<MessageId,ReferenceRecord> |
messageContainer
|
Fields inherited from class org.apache.activemq.store.AbstractMessageStore |
---|
destination |
Constructor Summary | |
---|---|
KahaReferenceStore(KahaReferenceStoreAdapter adapter,
MapContainer<MessageId,ReferenceRecord> container,
ActiveMQDestination destination)
|
Method Summary | |
---|---|
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(Object object)
|
ReferenceStore.ReferenceData |
getMessageReference(MessageId identity)
Looks up a message using either the String messageID or the messageNumber. |
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 |
removeMessage(MessageId msgId)
|
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()
|
Methods inherited from class org.apache.activemq.store.AbstractMessageStore |
---|
getDestination, isEmpty, setMemoryUsage, start, stop |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.activemq.store.MessageStore |
---|
getDestination, isEmpty, setMemoryUsage |
Methods inherited from interface org.apache.activemq.Service |
---|
start, stop |
Field Detail |
---|
protected final MapContainer<MessageId,ReferenceRecord> messageContainer
protected KahaReferenceStoreAdapter adapter
protected ActiveMQMessageAudit dispatchAudit
protected final Lock lock
Constructor Detail |
---|
public KahaReferenceStore(KahaReferenceStoreAdapter adapter, MapContainer<MessageId,ReferenceRecord> container, ActiveMQDestination destination) throws IOException
IOException
Method Detail |
---|
public Lock getStoreLock()
getStoreLock
in interface ReferenceStore
public void dispose(ConnectionContext context)
dispose
in interface MessageStore
dispose
in class AbstractMessageStore
protected MessageId getMessageId(Object object)
public void addMessage(ConnectionContext context, Message message) throws IOException
MessageStore
addMessage
in interface MessageStore
context
- context
IOException
public Message getMessage(MessageId identity) throws IOException
MessageStore
getMessage
in interface MessageStore
identity
- which contains either the messageID or the messageNumber
IOException
protected final boolean recoverReference(MessageRecoveryListener listener, ReferenceRecord record) throws Exception
Exception
public void recover(MessageRecoveryListener listener) throws Exception
MessageStore
recover
in interface MessageStore
Exception
public void recoverNextMessages(int maxReturned, MessageRecoveryListener listener) throws Exception
recoverNextMessages
in interface MessageStore
Exception
public boolean addMessageReference(ConnectionContext context, MessageId messageId, ReferenceStore.ReferenceData data) throws IOException
ReferenceStore
addMessageReference
in interface ReferenceStore
IOException
protected boolean isDuplicate(MessageId messageId)
public ReferenceStore.ReferenceData getMessageReference(MessageId identity) throws IOException
ReferenceStore
getMessageReference
in interface ReferenceStore
IOException
public void removeMessage(ConnectionContext context, MessageAck ack) throws IOException
MessageStore
removeMessage
in interface MessageStore
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
public void removeMessage(MessageId msgId) throws IOException
IOException
public void removeAllMessages(ConnectionContext context) throws IOException
MessageStore
removeAllMessages
in interface MessageStore
IOException
public void delete()
public void resetBatching()
MessageStore
resetBatching
in interface MessageStore
public int getMessageCount()
getMessageCount
in interface MessageStore
public boolean isSupportForCursors()
public boolean supportsExternalBatchControl()
supportsExternalBatchControl
in interface ReferenceStore
public void setBatch(MessageId startAfter)
MessageStore
setBatch
in interface MessageStore
setBatch
in interface ReferenceStore
setBatch
in class AbstractMessageStore
startAfter
- ReferenceStore.setBatch(org.apache.activemq.command.MessageId)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |