|
||||||||||
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.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.apache.qpid.server.store.DurableConfigurationStore |
---|
DurableConfigurationStore.Source |
Nested classes/interfaces inherited from interface org.apache.qpid.server.store.TransactionLog |
---|
TransactionLog.StoreFuture, TransactionLog.Transaction |
Field Summary |
---|
Fields inherited from interface org.apache.qpid.server.store.MessageStore |
---|
IMMEDIATE_FUTURE |
Constructor Summary | |
---|---|
MemoryMessageStore()
|
Method Summary | |
---|---|
StoredMessage |
addMessage(StorableMessageMetaData metaData)
|
void |
bindQueue(Exchange exchange,
org.apache.qpid.framing.AMQShortString routingKey,
AMQQueue queue,
org.apache.qpid.framing.FieldTable args)
Binds the specified queue to an exchange with a routing key. |
void |
close()
Called to close and cleanup any resources used by the message store. |
void |
configureConfigStore(String name,
ConfigurationRecoveryHandler handler,
Configuration configuration,
LogSubject logSubject)
Called after instantiation in order to configure the message store. |
void |
configureMessageStore(String name,
MessageStoreRecoveryHandler recoveryHandler,
Configuration config,
LogSubject logSubject)
Called after instantiation in order to configure the message store. |
void |
configureTransactionLog(String name,
TransactionLogRecoveryHandler recoveryHandler,
Configuration storeConfiguration,
LogSubject logSubject)
|
void |
createExchange(Exchange exchange)
Makes the specified exchange persistent. |
void |
createQueue(AMQQueue queue)
Makes the specified queue persistent. |
void |
createQueue(AMQQueue queue,
org.apache.qpid.framing.FieldTable arguments)
Makes the specified queue persistent. |
List<AMQQueue> |
createQueues()
|
Long |
getNewMessageId()
|
boolean |
isPersistent()
Is this store capable of persisting the data |
TransactionLog.Transaction |
newTransaction()
|
void |
removeExchange(Exchange exchange)
Removes the specified persistent exchange. |
void |
removeQueue(AMQQueue queue)
Removes the specified queue from the persistent store. |
void |
unbindQueue(Exchange exchange,
org.apache.qpid.framing.AMQShortString routingKey,
AMQQueue queue,
org.apache.qpid.framing.FieldTable args)
Unbinds the specified from an exchange under a particular routing key. |
void |
updateQueue(AMQQueue queue)
Updates the specified queue in the persistent store, IF it is already present. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MemoryMessageStore()
Method Detail |
---|
public void configureConfigStore(String name, ConfigurationRecoveryHandler handler, Configuration configuration, LogSubject logSubject) throws Exception
DurableConfigurationStore
configureConfigStore
in interface DurableConfigurationStore
name
- The name to be used by this storemhandler
- Handler to be called as the store recovers on start upconfiguration
- The apache commons configuration object.
Exception
- If any error occurs that means the store is unable to configure itself.public void configureMessageStore(String name, MessageStoreRecoveryHandler recoveryHandler, Configuration config, LogSubject logSubject) throws Exception
MessageStore
configureMessageStore
in interface MessageStore
name
- The name to be used by this storemrecoveryHandler
- Handler to be called as the store recovers on start upconfig
- The apache commons configuration object.
Exception
- If any error occurs that means the store is unable to configure itself.public void close() throws Exception
MessageStore
close
in interface MessageStore
Exception
- If the close fails.public StoredMessage addMessage(StorableMessageMetaData metaData)
addMessage
in interface MessageStore
public void createExchange(Exchange exchange) throws org.apache.qpid.AMQStoreException
DurableConfigurationStore
createExchange
in interface DurableConfigurationStore
exchange
- The exchange to persist.
org.apache.qpid.AMQStoreException
- If the operation fails for any reason.public void removeExchange(Exchange exchange) throws org.apache.qpid.AMQStoreException
DurableConfigurationStore
removeExchange
in interface DurableConfigurationStore
exchange
- The exchange to remove.
org.apache.qpid.AMQStoreException
- If the operation fails for any reason.public void bindQueue(Exchange exchange, org.apache.qpid.framing.AMQShortString routingKey, AMQQueue queue, org.apache.qpid.framing.FieldTable args) throws org.apache.qpid.AMQStoreException
DurableConfigurationStore
bindQueue
in interface DurableConfigurationStore
exchange
- The exchange to bind to.routingKey
- The routing key to bind by.queue
- The queue to bind.args
- Additional parameters.
org.apache.qpid.AMQStoreException
- if the operation fails for any reason.public void unbindQueue(Exchange exchange, org.apache.qpid.framing.AMQShortString routingKey, AMQQueue queue, org.apache.qpid.framing.FieldTable args) throws org.apache.qpid.AMQStoreException
DurableConfigurationStore
unbindQueue
in interface DurableConfigurationStore
exchange
- The exchange to unbind from.routingKey
- The routing key to unbind.queue
- The queue to unbind.args
- Additonal parameters.
org.apache.qpid.AMQStoreException
- If the operation fails for any reason.public void createQueue(AMQQueue queue) throws org.apache.qpid.AMQStoreException
DurableConfigurationStore
createQueue
in interface DurableConfigurationStore
queue
- The queue to store.
org.apache.qpid.AMQStoreException
- If the operation fails for any reason.public void createQueue(AMQQueue queue, org.apache.qpid.framing.FieldTable arguments) throws org.apache.qpid.AMQStoreException
DurableConfigurationStore
createQueue
in interface DurableConfigurationStore
queue
- The queue to store.arguments
- The additional arguments to the binding
org.apache.qpid.AMQStoreException
- If the operation fails for any reason.public void removeQueue(AMQQueue queue) throws org.apache.qpid.AMQStoreException
DurableConfigurationStore
removeQueue
in interface DurableConfigurationStore
queue
- The queue to remove.
org.apache.qpid.AMQStoreException
- If the operation fails for any reason.public void updateQueue(AMQQueue queue) throws org.apache.qpid.AMQStoreException
DurableConfigurationStore
updateQueue
in interface DurableConfigurationStore
queue
- The queue to update the entry for.
org.apache.qpid.AMQStoreException
- If the operation fails for any reason.public void configureTransactionLog(String name, TransactionLogRecoveryHandler recoveryHandler, Configuration storeConfiguration, LogSubject logSubject) throws Exception
configureTransactionLog
in interface TransactionLog
Exception
public TransactionLog.Transaction newTransaction()
newTransaction
in interface TransactionLog
public List<AMQQueue> createQueues() throws org.apache.qpid.AMQException
org.apache.qpid.AMQException
public Long getNewMessageId()
public boolean isPersistent()
MessageStore
isPersistent
in interface MessageStore
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |