org.apache.activemq.store
Interface ReferenceStore

All Superinterfaces:
MessageStore, Service
All Known Subinterfaces:
TopicReferenceStore
All Known Implementing Classes:
KahaReferenceStore, KahaTopicReferenceStore

public interface ReferenceStore
extends MessageStore

Represents a message store which is used by the persistent implementations


Nested Class Summary
static class ReferenceStore.ReferenceData
           
 
Method Summary
 boolean addMessageReference(ConnectionContext context, MessageId messageId, ReferenceStore.ReferenceData data)
          Adds a message reference to the message store
 ReferenceStore.ReferenceData getMessageReference(MessageId identity)
          Looks up a message using either the String messageID or the messageNumber.
 Lock getStoreLock()
           
 void setBatch(MessageId startAfter)
          allow caching cursors to set the current batch offset when cache is exhausted
 boolean supportsExternalBatchControl()
           
 
Methods inherited from interface org.apache.activemq.store.MessageStore
addMessage, addMessage, asyncAddQueueMessage, asyncAddQueueMessage, asyncAddTopicMessage, asyncAddTopicMessage, dispose, getDestination, getMessage, getMessageCount, isEmpty, isPrioritizedMessages, recover, recoverNextMessages, removeAllMessages, removeAsyncMessage, removeMessage, resetBatching, setMemoryUsage, setPrioritizedMessages
 
Methods inherited from interface org.apache.activemq.Service
start, stop
 

Method Detail

addMessageReference

boolean addMessageReference(ConnectionContext context,
                            MessageId messageId,
                            ReferenceStore.ReferenceData data)
                            throws IOException
Adds a message reference to the message store

Returns:
true if reference was added, false if it is a duplicate and not added
Throws:
IOException

getMessageReference

ReferenceStore.ReferenceData getMessageReference(MessageId identity)
                                                 throws IOException
Looks up a message using either the String messageID or the messageNumber. Implementations are encouraged to fill in the missing key if its easy to do so.

Throws:
IOException

supportsExternalBatchControl

boolean supportsExternalBatchControl()
Returns:
true if it supports external batch control

setBatch

void setBatch(MessageId startAfter)
Description copied from interface: MessageStore
allow caching cursors to set the current batch offset when cache is exhausted

Specified by:
setBatch in interface MessageStore

getStoreLock

Lock getStoreLock()


Copyright © 2005-2012 The Apache Software Foundation. All Rights Reserved.