Package org.apache.activemq.store.kahadb
Class MultiKahaDBPersistenceAdapter
java.lang.Object
org.apache.activemq.util.ServiceSupport
org.apache.activemq.broker.LockableServiceSupport
org.apache.activemq.store.kahadb.MultiKahaDBPersistenceAdapter
- All Implemented Interfaces:
org.apache.activemq.broker.BrokerServiceAware,org.apache.activemq.broker.Lockable,org.apache.activemq.Service,org.apache.activemq.store.NoLocalSubscriptionAware,org.apache.activemq.store.PersistenceAdapter
public class MultiKahaDBPersistenceAdapter
extends org.apache.activemq.broker.LockableServiceSupport
implements org.apache.activemq.store.PersistenceAdapter, org.apache.activemq.broker.BrokerServiceAware, org.apache.activemq.store.NoLocalSubscriptionAware
An implementation of
PersistenceAdapter that supports
distribution of destinations across multiple kahaDB persistence adapters-
Field Summary
Fields inherited from class org.apache.activemq.broker.LockableServiceSupport
brokerService, clockDaemon -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidbeginTransaction(org.apache.activemq.broker.ConnectionContext context) voidcheckpoint(boolean cleanup) voidcommitTransaction(org.apache.activemq.broker.ConnectionContext context) org.apache.activemq.broker.Lockerorg.apache.activemq.broker.scheduler.JobSchedulerStoreorg.apache.activemq.store.MessageStorecreateQueueMessageStore(org.apache.activemq.command.ActiveMQQueue destination) org.apache.activemq.store.TopicMessageStorecreateTopicMessageStore(org.apache.activemq.command.ActiveMQTopic destination) org.apache.activemq.store.TransactionStorevoidvoiddoStart()protected voiddoStop(org.apache.activemq.util.ServiceStopper stopper) List<org.apache.activemq.store.PersistenceAdapter>Set<org.apache.activemq.command.ActiveMQDestination>longintintlonglonggetLastProducerSequenceId(org.apache.activemq.command.ProducerId id) voidinit()booleanbooleanisLocalXid(org.apache.activemq.command.TransactionId xid) booleanstatic StringnameFromDestinationFilter(org.apache.activemq.command.ActiveMQDestination destination) voidremoveQueueMessageStore(org.apache.activemq.command.ActiveMQQueue destination) voidremoveTopicMessageStore(org.apache.activemq.command.ActiveMQTopic destination) voidrollbackTransaction(org.apache.activemq.broker.ConnectionContext context) voidsetBrokerName(String brokerName) voidsetBrokerService(org.apache.activemq.broker.BrokerService brokerService) voidsetCheckForCorruption(boolean checkForCorruption) voidsetDirectory(File directory) voidsetFilteredPersistenceAdapters(List entries) Sets the FilteredKahaDBPersistenceAdapter entriesvoidsetJournalCleanupInterval(long journalCleanupInterval) voidsetJournalMaxFileLength(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 usedvoidsetJournalWriteBatchSize(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 usedvoidsetTransactionStore(MultiKahaDBTransactionStore transactionStore) voidsetUsageManager(org.apache.activemq.usage.SystemUsage usageManager) longsize()toString()Methods inherited from class org.apache.activemq.broker.LockableServiceSupport
getBrokerService, getLocker, getLockKeepAlivePeriod, getScheduledThreadPoolExecutor, isStopOnError, isUseLock, keepLockAlive, postStop, preStart, setLocker, setLockKeepAlivePeriod, setScheduledThreadPoolExecutor, setStopOnError, setUseLock, stopBrokerMethods inherited from class org.apache.activemq.util.ServiceSupport
addServiceListener, dispose, isStarted, isStopped, isStopping, removeServiceListener, start, stopMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.activemq.Service
start, stop
-
Constructor Details
-
MultiKahaDBPersistenceAdapter
public MultiKahaDBPersistenceAdapter()
-
-
Method Details
-
setFilteredPersistenceAdapters
Sets the FilteredKahaDBPersistenceAdapter entries -
nameFromDestinationFilter
public static String nameFromDestinationFilter(org.apache.activemq.command.ActiveMQDestination destination) -
isLocalXid
public boolean isLocalXid(org.apache.activemq.command.TransactionId xid) -
beginTransaction
public void beginTransaction(org.apache.activemq.broker.ConnectionContext context) throws IOException - Specified by:
beginTransactionin interfaceorg.apache.activemq.store.PersistenceAdapter- Throws:
IOException
-
checkpoint
- Specified by:
checkpointin interfaceorg.apache.activemq.store.PersistenceAdapter- Throws:
IOException
-
commitTransaction
public void commitTransaction(org.apache.activemq.broker.ConnectionContext context) throws IOException - Specified by:
commitTransactionin interfaceorg.apache.activemq.store.PersistenceAdapter- Throws:
IOException
-
createQueueMessageStore
public org.apache.activemq.store.MessageStore createQueueMessageStore(org.apache.activemq.command.ActiveMQQueue destination) throws IOException - Specified by:
createQueueMessageStorein interfaceorg.apache.activemq.store.PersistenceAdapter- Throws:
IOException
-
createTopicMessageStore
public org.apache.activemq.store.TopicMessageStore createTopicMessageStore(org.apache.activemq.command.ActiveMQTopic destination) throws IOException - Specified by:
createTopicMessageStorein interfaceorg.apache.activemq.store.PersistenceAdapter- Throws:
IOException
-
createTransactionStore
- Specified by:
createTransactionStorein interfaceorg.apache.activemq.store.PersistenceAdapter- Throws:
IOException
-
deleteAllMessages
- Specified by:
deleteAllMessagesin interfaceorg.apache.activemq.store.PersistenceAdapter- Throws:
IOException
-
getDestinations
- Specified by:
getDestinationsin interfaceorg.apache.activemq.store.PersistenceAdapter
-
getLastMessageBrokerSequenceId
- Specified by:
getLastMessageBrokerSequenceIdin interfaceorg.apache.activemq.store.PersistenceAdapter- Throws:
IOException
-
getLastProducerSequenceId
- Specified by:
getLastProducerSequenceIdin interfaceorg.apache.activemq.store.PersistenceAdapter- Throws:
IOException
-
allowIOResumption
public void allowIOResumption()- Specified by:
allowIOResumptionin interfaceorg.apache.activemq.store.PersistenceAdapter
-
removeQueueMessageStore
public void removeQueueMessageStore(org.apache.activemq.command.ActiveMQQueue destination) - Specified by:
removeQueueMessageStorein interfaceorg.apache.activemq.store.PersistenceAdapter
-
removeTopicMessageStore
public void removeTopicMessageStore(org.apache.activemq.command.ActiveMQTopic destination) - Specified by:
removeTopicMessageStorein interfaceorg.apache.activemq.store.PersistenceAdapter
-
rollbackTransaction
public void rollbackTransaction(org.apache.activemq.broker.ConnectionContext context) throws IOException - Specified by:
rollbackTransactionin interfaceorg.apache.activemq.store.PersistenceAdapter- Throws:
IOException
-
setBrokerName
- Specified by:
setBrokerNamein interfaceorg.apache.activemq.store.PersistenceAdapter
-
setUsageManager
public void setUsageManager(org.apache.activemq.usage.SystemUsage usageManager) - Specified by:
setUsageManagerin interfaceorg.apache.activemq.store.PersistenceAdapter
-
size
public long size()- Specified by:
sizein interfaceorg.apache.activemq.store.PersistenceAdapter
-
doStart
- Specified by:
doStartin classorg.apache.activemq.util.ServiceSupport- Throws:
Exception
-
doStop
- Specified by:
doStopin classorg.apache.activemq.util.ServiceSupport- Throws:
Exception
-
getDirectory
- Specified by:
getDirectoryin interfaceorg.apache.activemq.store.PersistenceAdapter
-
setDirectory
- Specified by:
setDirectoryin interfaceorg.apache.activemq.store.PersistenceAdapter
-
init
- Specified by:
initin classorg.apache.activemq.broker.LockableServiceSupport- Throws:
Exception
-
setBrokerService
public void setBrokerService(org.apache.activemq.broker.BrokerService brokerService) - Specified by:
setBrokerServicein interfaceorg.apache.activemq.broker.BrokerServiceAware- Overrides:
setBrokerServicein classorg.apache.activemq.broker.LockableServiceSupport
-
setTransactionStore
-
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() -
setJournalCleanupInterval
public void setJournalCleanupInterval(long journalCleanupInterval) -
getJournalCleanupInterval
public long getJournalCleanupInterval() -
setCheckForCorruption
public void setCheckForCorruption(boolean checkForCorruption) -
isCheckForCorruption
public boolean isCheckForCorruption() -
getAdapters
-
toString
-
createDefaultLocker
- Specified by:
createDefaultLockerin interfaceorg.apache.activemq.broker.Lockable- Throws:
IOException
-
createJobSchedulerStore
public org.apache.activemq.broker.scheduler.JobSchedulerStore createJobSchedulerStore() throws IOException, UnsupportedOperationException- Specified by:
createJobSchedulerStorein interfaceorg.apache.activemq.store.PersistenceAdapter- Throws:
IOExceptionUnsupportedOperationException
-
isPersistNoLocal
public boolean isPersistNoLocal()- Specified by:
isPersistNoLocalin interfaceorg.apache.activemq.store.NoLocalSubscriptionAware
-