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 |
allowIOResumption() |
void |
beginTransaction(ConnectionContext context) |
void |
checkpoint(boolean cleanup) |
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() |
long |
getJournalCleanupInterval() |
int |
getJournalMaxFileLength() |
int |
getJournalWriteBatchSize() |
long |
getLastMessageBrokerSequenceId() |
long |
getLastProducerSequenceId(org.apache.activemq.command.ProducerId id) |
void |
init() |
boolean |
isCheckForCorruption() |
boolean |
isLocalXid(org.apache.activemq.command.TransactionId xid) |
static String |
nameFromDestinationFilter(org.apache.activemq.command.ActiveMQDestination destination) |
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 |
setCheckForCorruption(boolean checkForCorruption) |
void |
setDirectory(File directory) |
void |
setFilteredPersistenceAdapters(List entries)
Sets the FilteredKahaDBPersistenceAdapter entries
|
void |
setJournalCleanupInterval(long journalCleanupInterval) |
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, stopBroker
addServiceListener, dispose, isStarted, isStopped, isStopping, removeServiceListener, start, stop
public MultiKahaDBPersistenceAdapter()
public void setFilteredPersistenceAdapters(List entries)
public static String nameFromDestinationFilter(org.apache.activemq.command.ActiveMQDestination destination)
public boolean isLocalXid(org.apache.activemq.command.TransactionId xid)
public void beginTransaction(ConnectionContext context) throws IOException
beginTransaction
in interface PersistenceAdapter
IOException
public void checkpoint(boolean cleanup) throws IOException
checkpoint
in interface PersistenceAdapter
IOException
public void commitTransaction(ConnectionContext context) throws IOException
commitTransaction
in interface PersistenceAdapter
IOException
public MessageStore createQueueMessageStore(org.apache.activemq.command.ActiveMQQueue destination) throws IOException
createQueueMessageStore
in interface PersistenceAdapter
IOException
public TopicMessageStore createTopicMessageStore(org.apache.activemq.command.ActiveMQTopic destination) throws IOException
createTopicMessageStore
in interface PersistenceAdapter
IOException
public TransactionStore createTransactionStore() throws IOException
createTransactionStore
in interface PersistenceAdapter
IOException
public void deleteAllMessages() throws IOException
deleteAllMessages
in interface PersistenceAdapter
IOException
public Set<org.apache.activemq.command.ActiveMQDestination> getDestinations()
getDestinations
in interface PersistenceAdapter
public long getLastMessageBrokerSequenceId() throws IOException
getLastMessageBrokerSequenceId
in interface PersistenceAdapter
IOException
public long getLastProducerSequenceId(org.apache.activemq.command.ProducerId id) throws IOException
getLastProducerSequenceId
in interface PersistenceAdapter
IOException
public void allowIOResumption()
allowIOResumption
in interface PersistenceAdapter
public void removeQueueMessageStore(org.apache.activemq.command.ActiveMQQueue destination)
removeQueueMessageStore
in interface PersistenceAdapter
public void removeTopicMessageStore(org.apache.activemq.command.ActiveMQTopic destination)
removeTopicMessageStore
in interface PersistenceAdapter
public void rollbackTransaction(ConnectionContext context) throws IOException
rollbackTransaction
in interface PersistenceAdapter
IOException
public void setBrokerName(String brokerName)
setBrokerName
in interface PersistenceAdapter
public void setUsageManager(SystemUsage usageManager)
setUsageManager
in interface PersistenceAdapter
public long size()
size
in interface PersistenceAdapter
public void doStart() throws Exception
doStart
in class ServiceSupport
Exception
protected void doStop(ServiceStopper stopper) throws Exception
doStop
in class ServiceSupport
Exception
public File getDirectory()
getDirectory
in interface PersistenceAdapter
public void setDirectory(File directory)
setDirectory
in interface PersistenceAdapter
public void init() throws Exception
init
in class LockableServiceSupport
Exception
public void setBrokerService(BrokerService brokerService)
setBrokerService
in interface BrokerServiceAware
setBrokerService
in class LockableServiceSupport
public void setTransactionStore(MultiKahaDBTransactionStore transactionStore)
public void setJournalMaxFileLength(int maxFileLength)
public int getJournalMaxFileLength()
public void setJournalWriteBatchSize(int journalWriteBatchSize)
public int getJournalWriteBatchSize()
public void setJournalCleanupInterval(long journalCleanupInterval)
public long getJournalCleanupInterval()
public void setCheckForCorruption(boolean checkForCorruption)
public boolean isCheckForCorruption()
public List<PersistenceAdapter> getAdapters()
public Locker createDefaultLocker() throws IOException
createDefaultLocker
in interface Lockable
IOException
public JobSchedulerStore createJobSchedulerStore() throws IOException, UnsupportedOperationException
createJobSchedulerStore
in interface PersistenceAdapter
IOException
UnsupportedOperationException
Copyright © 2005–2021 FuseSource, Corp.. All rights reserved.