public class MultiKahaDBPersistenceAdapter extends LockableServiceSupport implements PersistenceAdapter, BrokerServiceAware
PersistenceAdapter that supports
distribution of destinations across multiple kahaDB persistence adaptersbrokerService, clockDaemon| Constructor and Description |
|---|
MultiKahaDBPersistenceAdapter() |
| Modifier and Type | Method and Description |
|---|---|
void |
beginTransaction(ConnectionContext context) |
void |
checkpoint(boolean sync) |
void |
commitTransaction(ConnectionContext context) |
Locker |
createDefaultLocker() |
JobSchedulerStore |
createJobSchedulerStore() |
MessageStore |
createQueueMessageStore(org.apache.activemq.command.ActiveMQQueue destination) |
TopicMessageStore |
createTopicMessageStore(org.apache.activemq.command.ActiveMQTopic destination) |
TransactionStore |
createTransactionStore() |
void |
deleteAllMessages() |
void |
doStart() |
protected void |
doStop(ServiceStopper stopper) |
List<PersistenceAdapter> |
getAdapters() |
Set<org.apache.activemq.command.ActiveMQDestination> |
getDestinations() |
File |
getDirectory() |
int |
getJournalMaxFileLength() |
int |
getJournalWriteBatchSize() |
long |
getLastMessageBrokerSequenceId() |
long |
getLastProducerSequenceId(org.apache.activemq.command.ProducerId id) |
void |
init() |
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() |
String |
toString() |
getBrokerService, getLocker, getLockKeepAlivePeriod, getScheduledThreadPoolExecutor, isUseLock, keepLockAlive, postStop, preStart, setLocker, setLockKeepAlivePeriod, setScheduledThreadPoolExecutor, setUseLock, stopBrokeraddServiceListener, dispose, isStarted, isStopped, isStopping, removeServiceListener, start, stoppublic MultiKahaDBPersistenceAdapter()
public void setFilteredPersistenceAdapters(List entries)
public boolean isLocalXid(org.apache.activemq.command.TransactionId xid)
public void beginTransaction(ConnectionContext context) throws IOException
beginTransaction in interface PersistenceAdapterIOExceptionpublic void checkpoint(boolean sync) throws IOException
checkpoint in interface PersistenceAdapterIOExceptionpublic void commitTransaction(ConnectionContext context) throws IOException
commitTransaction in interface PersistenceAdapterIOExceptionpublic MessageStore createQueueMessageStore(org.apache.activemq.command.ActiveMQQueue destination) throws IOException
createQueueMessageStore in interface PersistenceAdapterIOExceptionpublic TopicMessageStore createTopicMessageStore(org.apache.activemq.command.ActiveMQTopic destination) throws IOException
createTopicMessageStore in interface PersistenceAdapterIOExceptionpublic TransactionStore createTransactionStore() throws IOException
createTransactionStore in interface PersistenceAdapterIOExceptionpublic void deleteAllMessages() throws IOException
deleteAllMessages in interface PersistenceAdapterIOExceptionpublic Set<org.apache.activemq.command.ActiveMQDestination> getDestinations()
getDestinations in interface PersistenceAdapterpublic long getLastMessageBrokerSequenceId() throws IOException
getLastMessageBrokerSequenceId in interface PersistenceAdapterIOExceptionpublic long getLastProducerSequenceId(org.apache.activemq.command.ProducerId id) throws IOException
getLastProducerSequenceId in interface PersistenceAdapterIOExceptionpublic void removeQueueMessageStore(org.apache.activemq.command.ActiveMQQueue destination)
removeQueueMessageStore in interface PersistenceAdapterpublic void removeTopicMessageStore(org.apache.activemq.command.ActiveMQTopic destination)
removeTopicMessageStore in interface PersistenceAdapterpublic void rollbackTransaction(ConnectionContext context) throws IOException
rollbackTransaction in interface PersistenceAdapterIOExceptionpublic void setBrokerName(String brokerName)
setBrokerName in interface PersistenceAdapterpublic void setUsageManager(SystemUsage usageManager)
setUsageManager in interface PersistenceAdapterpublic long size()
size in interface PersistenceAdapterpublic void doStart() throws Exception
doStart in class ServiceSupportExceptionprotected void doStop(ServiceStopper stopper) throws Exception
doStop in class ServiceSupportExceptionpublic File getDirectory()
getDirectory in interface PersistenceAdapterpublic void setDirectory(File directory)
setDirectory in interface PersistenceAdapterpublic void init() throws Exception
init in class LockableServiceSupportExceptionpublic void setBrokerService(BrokerService brokerService)
setBrokerService in interface BrokerServiceAwaresetBrokerService in class LockableServiceSupportpublic void setTransactionStore(MultiKahaDBTransactionStore transactionStore)
public void setJournalMaxFileLength(int maxFileLength)
public int getJournalMaxFileLength()
public void setJournalWriteBatchSize(int journalWriteBatchSize)
public int getJournalWriteBatchSize()
public List<PersistenceAdapter> getAdapters()
public Locker createDefaultLocker() throws IOException
createDefaultLocker in interface LockableIOExceptionpublic JobSchedulerStore createJobSchedulerStore() throws IOException, UnsupportedOperationException
createJobSchedulerStore in interface PersistenceAdapterIOExceptionUnsupportedOperationExceptionCopyright © 2005–2017 FuseSource, Corp.. All rights reserved.