org.apache.qpid.server.store
Interface MessageStore

All Known Implementing Classes:
MemoryMessageStore

public interface MessageStore


Method Summary
 void abortTran()
           
 void beginTran()
           
 void close()
          Called to close and cleanup any resources used by the message store.
 void commitTran()
           
 void configure(QueueRegistry queueRegistry, java.lang.String base, org.apache.commons.configuration.Configuration config)
          Called after instantiation in order to configure the message store.
 void createQueue(AMQQueue queue)
           
 java.util.List<AMQQueue> createQueues()
          Recreate all queues that were persisted, including re-enqueuing of existing messages
 void dequeueMessage(java.lang.String name, long messageId)
           
 void enqueueMessage(java.lang.String name, long messageId)
           
 long getNewMessageId()
          Return a valid, currently unused message id.
 boolean inTran()
           
 void put(AMQMessage msg)
           
 void removeMessage(long messageId)
           
 void removeQueue(java.lang.String name)
           
 

Method Detail

configure

void configure(QueueRegistry queueRegistry,
               java.lang.String base,
               org.apache.commons.configuration.Configuration config)
               throws java.lang.Exception
Called after instantiation in order to configure the message store. A particular implementation can define whatever parameters it wants.

Parameters:
queueRegistry - the registry of queues to be used by this store
base - the base element identifier from which all configuration items are relative. For example, if the base element is "store", the all elements used by concrete classes will be "store.foo" etc.
config - the apache commons configuration object
Throws:
java.lang.Exception

close

void close()
           throws java.lang.Exception
Called to close and cleanup any resources used by the message store.

Throws:
java.lang.Exception

put

void put(AMQMessage msg)
         throws org.apache.qpid.AMQException
Throws:
org.apache.qpid.AMQException

removeMessage

void removeMessage(long messageId)
                   throws org.apache.qpid.AMQException
Throws:
org.apache.qpid.AMQException

createQueue

void createQueue(AMQQueue queue)
                 throws org.apache.qpid.AMQException
Throws:
org.apache.qpid.AMQException

removeQueue

void removeQueue(java.lang.String name)
                 throws org.apache.qpid.AMQException
Throws:
org.apache.qpid.AMQException

enqueueMessage

void enqueueMessage(java.lang.String name,
                    long messageId)
                    throws org.apache.qpid.AMQException
Throws:
org.apache.qpid.AMQException

dequeueMessage

void dequeueMessage(java.lang.String name,
                    long messageId)
                    throws org.apache.qpid.AMQException
Throws:
org.apache.qpid.AMQException

beginTran

void beginTran()
               throws org.apache.qpid.AMQException
Throws:
org.apache.qpid.AMQException

commitTran

void commitTran()
                throws org.apache.qpid.AMQException
Throws:
org.apache.qpid.AMQException

abortTran

void abortTran()
               throws org.apache.qpid.AMQException
Throws:
org.apache.qpid.AMQException

inTran

boolean inTran()

createQueues

java.util.List<AMQQueue> createQueues()
                                      throws org.apache.qpid.AMQException
Recreate all queues that were persisted, including re-enqueuing of existing messages

Returns:
Throws:
org.apache.qpid.AMQException

getNewMessageId

long getNewMessageId()
Return a valid, currently unused message id.

Returns:
a message id