org.apache.qpid.server.store
Interface DurableConfigurationStore

All Known Subinterfaces:
MessageStore
All Known Implementing Classes:
AbstractMessageStore, DerbyMessageStore, MemoryMessageStore

public interface DurableConfigurationStore


Nested Class Summary
static interface DurableConfigurationStore.Source
           
 
Method Summary
 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 configureConfigStore(String name, ConfigurationRecoveryHandler recoveryHandler, Configuration config, LogSubject logSubject)
          Called after instantiation in order to configure the message store.
 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.
 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.
 

Method Detail

configureConfigStore

void configureConfigStore(String name,
                          ConfigurationRecoveryHandler recoveryHandler,
                          Configuration config,
                          LogSubject logSubject)
                          throws Exception
Called after instantiation in order to configure the message store. A particular implementation can define whatever parameters it wants.

Parameters:
name - The name to be used by this storem
recoveryHandler - Handler to be called as the store recovers on start up
config - The apache commons configuration object.
Throws:
Exception - If any error occurs that means the store is unable to configure itself.

createExchange

void createExchange(Exchange exchange)
                    throws org.apache.qpid.AMQStoreException
Makes the specified exchange persistent.

Parameters:
exchange - The exchange to persist.
Throws:
org.apache.qpid.AMQStoreException - If the operation fails for any reason.

removeExchange

void removeExchange(Exchange exchange)
                    throws org.apache.qpid.AMQStoreException
Removes the specified persistent exchange.

Parameters:
exchange - The exchange to remove.
Throws:
org.apache.qpid.AMQStoreException - If the operation fails for any reason.

bindQueue

void bindQueue(Exchange exchange,
               org.apache.qpid.framing.AMQShortString routingKey,
               AMQQueue queue,
               org.apache.qpid.framing.FieldTable args)
               throws org.apache.qpid.AMQStoreException
Binds the specified queue to an exchange with a routing key.

Parameters:
exchange - The exchange to bind to.
routingKey - The routing key to bind by.
queue - The queue to bind.
args - Additional parameters.
Throws:
org.apache.qpid.AMQStoreException - if the operation fails for any reason.

unbindQueue

void unbindQueue(Exchange exchange,
                 org.apache.qpid.framing.AMQShortString routingKey,
                 AMQQueue queue,
                 org.apache.qpid.framing.FieldTable args)
                 throws org.apache.qpid.AMQStoreException
Unbinds the specified from an exchange under a particular routing key.

Parameters:
exchange - The exchange to unbind from.
routingKey - The routing key to unbind.
queue - The queue to unbind.
args - Additonal parameters.
Throws:
org.apache.qpid.AMQStoreException - If the operation fails for any reason.

createQueue

void createQueue(AMQQueue queue)
                 throws org.apache.qpid.AMQStoreException
Makes the specified queue persistent.

Parameters:
queue - The queue to store.
Throws:
org.apache.qpid.AMQStoreException - If the operation fails for any reason.

createQueue

void createQueue(AMQQueue queue,
                 org.apache.qpid.framing.FieldTable arguments)
                 throws org.apache.qpid.AMQStoreException
Makes the specified queue persistent.

Parameters:
queue - The queue to store.
arguments - The additional arguments to the binding
Throws:
org.apache.qpid.AMQStoreException - If the operation fails for any reason.

removeQueue

void removeQueue(AMQQueue queue)
                 throws org.apache.qpid.AMQStoreException
Removes the specified queue from the persistent store.

Parameters:
queue - The queue to remove.
Throws:
org.apache.qpid.AMQStoreException - If the operation fails for any reason.

updateQueue

void updateQueue(AMQQueue queue)
                 throws org.apache.qpid.AMQStoreException
Updates the specified queue in the persistent store, IF it is already present. If the queue is not present in the store, it will not be added.

Parameters:
queue - The queue to update the entry for.
Throws:
org.apache.qpid.AMQStoreException - If the operation fails for any reason.


Licensed to the Apache Software Foundation