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:
BrokerServiceAware,Lockable,org.apache.activemq.Service,NoLocalSubscriptionAware,PersistenceAdapter
public class MultiKahaDBPersistenceAdapter
extends LockableServiceSupport
implements PersistenceAdapter, BrokerServiceAware, 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(ConnectionContext context) voidcheckpoint(boolean cleanup) voidcommitTransaction(ConnectionContext context) createQueueMessageStore(org.apache.activemq.command.ActiveMQQueue destination) createTopicMessageStore(org.apache.activemq.command.ActiveMQTopic destination) voidvoiddoStart()protected voiddoStop(ServiceStopper stopper) 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(ConnectionContext context) voidsetBrokerName(String brokerName) voidsetBrokerService(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(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
- Specified by:
beginTransactionin interfacePersistenceAdapter- Throws:
IOException
-
checkpoint
- Specified by:
checkpointin interfacePersistenceAdapter- Throws:
IOException
-
commitTransaction
- Specified by:
commitTransactionin interfacePersistenceAdapter- Throws:
IOException
-
createQueueMessageStore
public MessageStore createQueueMessageStore(org.apache.activemq.command.ActiveMQQueue destination) throws IOException - Specified by:
createQueueMessageStorein interfacePersistenceAdapter- Throws:
IOException
-
createTopicMessageStore
public TopicMessageStore createTopicMessageStore(org.apache.activemq.command.ActiveMQTopic destination) throws IOException - Specified by:
createTopicMessageStorein interfacePersistenceAdapter- Throws:
IOException
-
createTransactionStore
- Specified by:
createTransactionStorein interfacePersistenceAdapter- Throws:
IOException
-
deleteAllMessages
- Specified by:
deleteAllMessagesin interfacePersistenceAdapter- Throws:
IOException
-
getDestinations
- Specified by:
getDestinationsin interfacePersistenceAdapter
-
getLastMessageBrokerSequenceId
- Specified by:
getLastMessageBrokerSequenceIdin interfacePersistenceAdapter- Throws:
IOException
-
getLastProducerSequenceId
- Specified by:
getLastProducerSequenceIdin interfacePersistenceAdapter- Throws:
IOException
-
allowIOResumption
public void allowIOResumption()- Specified by:
allowIOResumptionin interfacePersistenceAdapter
-
removeQueueMessageStore
public void removeQueueMessageStore(org.apache.activemq.command.ActiveMQQueue destination) - Specified by:
removeQueueMessageStorein interfacePersistenceAdapter
-
removeTopicMessageStore
public void removeTopicMessageStore(org.apache.activemq.command.ActiveMQTopic destination) - Specified by:
removeTopicMessageStorein interfacePersistenceAdapter
-
rollbackTransaction
- Specified by:
rollbackTransactionin interfacePersistenceAdapter- Throws:
IOException
-
setBrokerName
- Specified by:
setBrokerNamein interfacePersistenceAdapter
-
setUsageManager
- Specified by:
setUsageManagerin interfacePersistenceAdapter
-
size
public long size()- Specified by:
sizein interfacePersistenceAdapter
-
doStart
- Specified by:
doStartin classServiceSupport- Throws:
Exception
-
doStop
- Specified by:
doStopin classServiceSupport- Throws:
Exception
-
getDirectory
- Specified by:
getDirectoryin interfacePersistenceAdapter
-
setDirectory
- Specified by:
setDirectoryin interfacePersistenceAdapter
-
init
- Specified by:
initin classLockableServiceSupport- Throws:
Exception
-
setBrokerService
- Specified by:
setBrokerServicein interfaceBrokerServiceAware- Overrides:
setBrokerServicein classLockableServiceSupport
-
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 interfaceLockable- Throws:
IOException
-
createJobSchedulerStore
public JobSchedulerStore createJobSchedulerStore() throws IOException, UnsupportedOperationException- Specified by:
createJobSchedulerStorein interfacePersistenceAdapter- Throws:
IOExceptionUnsupportedOperationException
-
isPersistNoLocal
public boolean isPersistNoLocal()- Specified by:
isPersistNoLocalin interfaceNoLocalSubscriptionAware
-