org.apache.activemq.store.kahadb
Class MultiKahaDBPersistenceAdapter

java.lang.Object
  extended by org.apache.activemq.filter.DestinationMap
      extended by org.apache.activemq.store.kahadb.MultiKahaDBPersistenceAdapter
All Implemented Interfaces:
BrokerServiceAware, org.apache.activemq.Service, PersistenceAdapter

public class MultiKahaDBPersistenceAdapter
extends DestinationMap
implements PersistenceAdapter, BrokerServiceAware

An implementation of PersistenceAdapter that supports distribution of destinations across multiple kahaDB persistence adapters


Field Summary
 
Fields inherited from class org.apache.activemq.filter.DestinationMap
ANY_CHILD, ANY_DESCENDENT
 
Constructor Summary
MultiKahaDBPersistenceAdapter()
           
 
Method Summary
 void beginTransaction(ConnectionContext context)
           
 void checkpoint(boolean sync)
           
 void commitTransaction(ConnectionContext context)
           
 MessageStore createQueueMessageStore(org.apache.activemq.command.ActiveMQQueue destination)
           
 TopicMessageStore createTopicMessageStore(org.apache.activemq.command.ActiveMQTopic destination)
           
 TransactionStore createTransactionStore()
           
 void deleteAllMessages()
           
 BrokerService getBrokerService()
           
 Set<org.apache.activemq.command.ActiveMQDestination> getDestinations()
           
 File getDirectory()
           
 int getJournalMaxFileLength()
           
 int getJournalWriteBatchSize()
           
 long getLastMessageBrokerSequenceId()
           
 long getLastProducerSequenceId(org.apache.activemq.command.ProducerId id)
           
 boolean isLocalXid(org.apache.activemq.command.TransactionId xid)
           
 void removeQueueMessageStore(org.apache.activemq.command.ActiveMQQueue destination)
           
 void removeTopicMessageStore(org.apache.activemq.command.ActiveMQTopic destination)
           
 void rollbackTransaction(ConnectionContext context)
           
 void setBrokerName(String brokerName)
           
 void setBrokerService(BrokerService brokerService)
           
 void setDirectory(File directory)
           
 void setFilteredPersistenceAdapters(List entries)
          Sets the FilteredKahaDBPersistenceAdapter entries
 void setJournalMaxFileLength(int maxFileLength)
          Set the max file length of the transaction journal When set using Xbean, values of the form "20 Mb", "1024kb", and "1g" can be used
 void setJournalWriteBatchSize(int journalWriteBatchSize)
          Set the max write batch size of the transaction journal When set using Xbean, values of the form "20 Mb", "1024kb", and "1g" can be used
 void setTransactionStore(MultiKahaDBTransactionStore transactionStore)
           
 void setUsageManager(SystemUsage usageManager)
           
 long size()
           
 void start()
           
 void stop()
           
 String toString()
           
 
Methods inherited from class org.apache.activemq.filter.DestinationMap
chooseValue, findWildcardMatches, get, getEntryClass, getQueueRootChildCount, getQueueRootNode, getRootNode, getTempQueueRootNode, getTempTopicRootNode, getTopicRootChildCount, getTopicRootNode, put, remove, removeAll, reset, setEntries, union
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MultiKahaDBPersistenceAdapter

public MultiKahaDBPersistenceAdapter()
Method Detail

setFilteredPersistenceAdapters

public void setFilteredPersistenceAdapters(List entries)
Sets the FilteredKahaDBPersistenceAdapter entries


isLocalXid

public boolean isLocalXid(org.apache.activemq.command.TransactionId xid)

beginTransaction

public void beginTransaction(ConnectionContext context)
                      throws IOException
Specified by:
beginTransaction in interface PersistenceAdapter
Throws:
IOException

checkpoint

public void checkpoint(boolean sync)
                throws IOException
Specified by:
checkpoint in interface PersistenceAdapter
Throws:
IOException

commitTransaction

public void commitTransaction(ConnectionContext context)
                       throws IOException
Specified by:
commitTransaction in interface PersistenceAdapter
Throws:
IOException

createQueueMessageStore

public MessageStore createQueueMessageStore(org.apache.activemq.command.ActiveMQQueue destination)
                                     throws IOException
Specified by:
createQueueMessageStore in interface PersistenceAdapter
Throws:
IOException

createTopicMessageStore

public TopicMessageStore createTopicMessageStore(org.apache.activemq.command.ActiveMQTopic destination)
                                          throws IOException
Specified by:
createTopicMessageStore in interface PersistenceAdapter
Throws:
IOException

createTransactionStore

public TransactionStore createTransactionStore()
                                        throws IOException
Specified by:
createTransactionStore in interface PersistenceAdapter
Throws:
IOException

deleteAllMessages

public void deleteAllMessages()
                       throws IOException
Specified by:
deleteAllMessages in interface PersistenceAdapter
Throws:
IOException

getDestinations

public Set<org.apache.activemq.command.ActiveMQDestination> getDestinations()
Specified by:
getDestinations in interface PersistenceAdapter

getLastMessageBrokerSequenceId

public long getLastMessageBrokerSequenceId()
                                    throws IOException
Specified by:
getLastMessageBrokerSequenceId in interface PersistenceAdapter
Throws:
IOException

getLastProducerSequenceId

public long getLastProducerSequenceId(org.apache.activemq.command.ProducerId id)
                               throws IOException
Specified by:
getLastProducerSequenceId in interface PersistenceAdapter
Throws:
IOException

removeQueueMessageStore

public void removeQueueMessageStore(org.apache.activemq.command.ActiveMQQueue destination)
Specified by:
removeQueueMessageStore in interface PersistenceAdapter

removeTopicMessageStore

public void removeTopicMessageStore(org.apache.activemq.command.ActiveMQTopic destination)
Specified by:
removeTopicMessageStore in interface PersistenceAdapter

rollbackTransaction

public void rollbackTransaction(ConnectionContext context)
                         throws IOException
Specified by:
rollbackTransaction in interface PersistenceAdapter
Throws:
IOException

setBrokerName

public void setBrokerName(String brokerName)
Specified by:
setBrokerName in interface PersistenceAdapter

setUsageManager

public void setUsageManager(SystemUsage usageManager)
Specified by:
setUsageManager in interface PersistenceAdapter

size

public long size()
Specified by:
size in interface PersistenceAdapter

start

public void start()
           throws Exception
Specified by:
start in interface org.apache.activemq.Service
Throws:
Exception

stop

public void stop()
          throws Exception
Specified by:
stop in interface org.apache.activemq.Service
Throws:
Exception

getDirectory

public File getDirectory()
Specified by:
getDirectory in interface PersistenceAdapter

setDirectory

public void setDirectory(File directory)
Specified by:
setDirectory in interface PersistenceAdapter

setBrokerService

public void setBrokerService(BrokerService brokerService)
Specified by:
setBrokerService in interface BrokerServiceAware

getBrokerService

public BrokerService getBrokerService()

setTransactionStore

public void setTransactionStore(MultiKahaDBTransactionStore transactionStore)

setJournalMaxFileLength

public void setJournalMaxFileLength(int maxFileLength)
Set the max file length of the transaction journal When set using Xbean, values of the form "20 Mb", "1024kb", and "1g" can be used


getJournalMaxFileLength

public int getJournalMaxFileLength()

setJournalWriteBatchSize

public void setJournalWriteBatchSize(int journalWriteBatchSize)
Set the max write batch size of the transaction journal When set using Xbean, values of the form "20 Mb", "1024kb", and "1g" can be used


getJournalWriteBatchSize

public int getJournalWriteBatchSize()

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2005-2013 The Apache Software Foundation. All Rights Reserved.