|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.qpid.server.store.MemoryMessageStore
public class MemoryMessageStore
A simple message store that stores the messages in a threadsafe structure in memory.
Field Summary | |
---|---|
protected java.util.concurrent.ConcurrentMap<java.lang.Long,AMQMessage> |
_messageMap
|
Constructor Summary | |
---|---|
MemoryMessageStore()
|
Method Summary | |
---|---|
void |
abortTran()
|
void |
beginTran()
|
void |
close()
Called to close and cleanup any resources used by the message store. |
void |
commitTran()
|
void |
configure()
|
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 |
configure(java.lang.String base,
org.apache.commons.configuration.Configuration config)
|
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)
|
AMQMessage |
getMessage(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)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.concurrent.ConcurrentMap<java.lang.Long,AMQMessage> _messageMap
Constructor Detail |
---|
public MemoryMessageStore()
Method Detail |
---|
public void configure()
public void configure(java.lang.String base, org.apache.commons.configuration.Configuration config)
public void configure(QueueRegistry queueRegistry, java.lang.String base, org.apache.commons.configuration.Configuration config) throws java.lang.Exception
MessageStore
configure
in interface MessageStore
queueRegistry
- the registry of queues to be used by this storebase
- 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
java.lang.Exception
public void close() throws java.lang.Exception
MessageStore
close
in interface MessageStore
java.lang.Exception
public void put(AMQMessage msg)
put
in interface MessageStore
public void removeMessage(long messageId)
removeMessage
in interface MessageStore
public void createQueue(AMQQueue queue) throws org.apache.qpid.AMQException
createQueue
in interface MessageStore
org.apache.qpid.AMQException
public void removeQueue(java.lang.String name) throws org.apache.qpid.AMQException
removeQueue
in interface MessageStore
org.apache.qpid.AMQException
public void enqueueMessage(java.lang.String name, long messageId) throws org.apache.qpid.AMQException
enqueueMessage
in interface MessageStore
org.apache.qpid.AMQException
public void dequeueMessage(java.lang.String name, long messageId) throws org.apache.qpid.AMQException
dequeueMessage
in interface MessageStore
org.apache.qpid.AMQException
public void beginTran() throws org.apache.qpid.AMQException
beginTran
in interface MessageStore
org.apache.qpid.AMQException
public void commitTran() throws org.apache.qpid.AMQException
commitTran
in interface MessageStore
org.apache.qpid.AMQException
public void abortTran() throws org.apache.qpid.AMQException
abortTran
in interface MessageStore
org.apache.qpid.AMQException
public boolean inTran()
inTran
in interface MessageStore
public java.util.List<AMQQueue> createQueues() throws org.apache.qpid.AMQException
MessageStore
createQueues
in interface MessageStore
org.apache.qpid.AMQException
public long getNewMessageId()
MessageStore
getNewMessageId
in interface MessageStore
public AMQMessage getMessage(long messageId)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |