Home » activemq-parent-5.3.1-source-release » org.apache » activemq » store » [javadoc | source]
org.apache.activemq.store
public interface: PersistenceAdapter [javadoc | source]

All Implemented Interfaces:
    Service

All Known Implementing Classes:
    KahaDBStore, JDBCPersistenceAdapter, KahaPersistenceAdapter, AMQPersistenceAdapter, JournalPersistenceAdapter, ReferenceStoreAdapter, TempKahaDBStore, JPAReferenceStoreAdapter, KahaDBPersistenceAdapter, JPAPersistenceAdapter, KahaReferenceStoreAdapter, MemoryPersistenceAdapter

Adapter to the actual persistence mechanism used with ActiveMQ
Method from org.apache.activemq.store.PersistenceAdapter Summary:
beginTransaction,   checkpoint,   commitTransaction,   createQueueMessageStore,   createTopicMessageStore,   createTransactionStore,   deleteAllMessages,   getDestinations,   getLastMessageBrokerSequenceId,   removeQueueMessageStore,   removeTopicMessageStore,   rollbackTransaction,   setBrokerName,   setDirectory,   setUsageManager,   size
Method from org.apache.activemq.store.PersistenceAdapter Detail:
 public  void beginTransaction(ConnectionContext context) throws IOException
    This method starts a transaction on the persistent storage - which is nothing to do with JMS or XA transactions - its purely a mechanism to perform multiple writes to a persistent store in 1 transaction as a performance optimization.

    Typically one transaction will require one disk synchronization point and so for real high performance its usually faster to perform many writes within the same transaction to minimize latency caused by disk synchronization. This is especially true when using tools like Berkeley Db or embedded JDBC servers.

 public  void checkpoint(boolean sync) throws IOException
    checkpoint any
 public  void commitTransaction(ConnectionContext context) throws IOException
    Commit a persistence transaction
 public MessageStore createQueueMessageStore(ActiveMQQueue destination) throws IOException
    Factory method to create a new queue message store with the given destination name
 public TopicMessageStore createTopicMessageStore(ActiveMQTopic destination) throws IOException
    Factory method to create a new topic message store with the given destination name
 public TransactionStore createTransactionStore() throws IOException
    Factory method to create a new persistent prepared transaction store for XA recovery
 public  void deleteAllMessages() throws IOException
    Delete's all the messages in the persistent store.
 public Set<ActiveMQDestination> getDestinations()
 public long getLastMessageBrokerSequenceId() throws IOException
 public  void removeQueueMessageStore(ActiveMQQueue destination)
    Cleanup method to remove any state associated with the given destination. This method does not stop the message store (it might not be cached).
 public  void removeTopicMessageStore(ActiveMQTopic destination)
    Cleanup method to remove any state associated with the given destination This method does not stop the message store (it might not be cached).
 public  void rollbackTransaction(ConnectionContext context) throws IOException
    Rollback a persistence transaction
 public  void setBrokerName(String brokerName)
    Set the name of the broker using the adapter
 public  void setDirectory(File dir)
    Set the directory where any data files should be created
 public  void setUsageManager(SystemUsage usageManager)
 public long size()
    A hint to return the size of the store on disk