public class KahaDBPersistenceAdapter extends LockableServiceSupport implements PersistenceAdapter, JournaledStore, TransactionIdTransformerAware
PersistenceAdapter designed for use with
KahaDB - Embedded Lightweight Non-Relational DatabasebrokerService| Constructor and Description |
|---|
KahaDBPersistenceAdapter() |
| Modifier and Type | Method and Description |
|---|---|
void |
beginTransaction(ConnectionContext context) |
void |
checkpoint(boolean sync) |
void |
commitTransaction(ConnectionContext context) |
Locker |
createDefaultLocker() |
MessageStore |
createQueueMessageStore(ActiveMQQueue destination) |
TopicMessageStore |
createTopicMessageStore(ActiveMQTopic destination) |
KahaTransactionInfo |
createTransactionInfo(TransactionId txid) |
TransactionStore |
createTransactionStore() |
void |
deleteAllMessages() |
void |
doStart() |
void |
doStop(ServiceStopper stopper) |
long |
getCheckpointInterval()
Get the checkpointInterval
|
long |
getCleanupInterval()
Get the cleanupInterval
|
java.util.Set<ActiveMQDestination> |
getDestinations() |
java.io.File |
getDirectory()
Get the directory
|
java.io.File |
getDirectoryArchive() |
int |
getFailoverProducersAuditDepth() |
boolean |
getForceRecoverIndex() |
int |
getIndexCacheSize()
Get the indexCacheSize
|
float |
getIndexLFUEvictionFactor() |
int |
getIndexWriteBatchSize()
Get the indexWriteBatchSize
|
int |
getJournalMaxFileLength()
Get the journalMaxFileLength
|
int |
getJournalMaxWriteBatchSize()
Get the journalMaxWriteBatchSize
|
long |
getLastMessageBrokerSequenceId() |
long |
getLastProducerSequenceId(ProducerId id) |
int |
getMaxAsyncJobs() |
int |
getMaxFailoverProducersToTrack() |
java.lang.String |
getPreallocationScope() |
java.lang.String |
getPreallocationStrategy() |
KahaDBStore |
getStore() |
void |
init() |
boolean |
isArchiveCorruptedIndex() |
boolean |
isArchiveDataLogs() |
boolean |
isCheckForCorruptJournalFiles() |
boolean |
isChecksumJournalFiles() |
boolean |
isConcurrentStoreAndDispatchQueues() |
boolean |
isConcurrentStoreAndDispatchTopics() |
boolean |
isEnableIndexDiskSyncs() |
boolean |
isEnableIndexPageCaching() |
boolean |
isEnableIndexRecoveryFile() |
boolean |
isEnableIndexWriteAsync()
Get the enableIndexWriteAsync
|
boolean |
isEnableJournalDiskSyncs()
Get the enableJournalDiskSyncs
|
boolean |
isIgnoreMissingJournalfiles()
Get the ignoreMissingJournalfiles
|
boolean |
isUseIndexLFRUEviction() |
void |
removeQueueMessageStore(ActiveMQQueue destination) |
void |
removeTopicMessageStore(ActiveMQTopic destination) |
void |
rollbackTransaction(ConnectionContext context) |
void |
setArchiveCorruptedIndex(boolean archiveCorruptedIndex) |
void |
setArchiveDataLogs(boolean archiveDataLogs) |
void |
setBrokerName(java.lang.String brokerName) |
void |
setBrokerService(BrokerService brokerService) |
void |
setCheckForCorruptJournalFiles(boolean checkForCorruptJournalFiles) |
void |
setCheckpointInterval(long checkpointInterval)
Set the checkpointInterval
|
void |
setChecksumJournalFiles(boolean checksumJournalFiles) |
void |
setCleanupInterval(long cleanupInterval)
Set the cleanupInterval
|
void |
setConcurrentStoreAndDispatchQueues(boolean concurrentStoreAndDispatch) |
void |
setConcurrentStoreAndDispatchTopics(boolean concurrentStoreAndDispatch) |
void |
setDatabaseLockedWaitDelay(int databaseLockedWaitDelay)
Deprecated.
use
Locker.setLockAcquireSleepInterval(long) instead |
void |
setDirectory(java.io.File dir) |
void |
setDirectoryArchive(java.io.File directoryArchive) |
void |
setEnableIndexDiskSyncs(boolean diskSyncs) |
void |
setEnableIndexPageCaching(boolean enable) |
void |
setEnableIndexRecoveryFile(boolean enable) |
void |
setEnableIndexWriteAsync(boolean enableIndexWriteAsync)
Set the enableIndexWriteAsync
|
void |
setEnableJournalDiskSyncs(boolean enableJournalDiskSyncs)
Set the enableJournalDiskSyncs
|
void |
setFailoverProducersAuditDepth(int failoverProducersAuditDepth)
set the audit window depth for duplicate suppression (should exceed the max transaction
batch)
|
void |
setForceRecoverIndex(boolean forceRecoverIndex) |
void |
setIgnoreMissingJournalfiles(boolean ignoreMissingJournalfiles)
Set the ignoreMissingJournalfiles
|
void |
setIndexCacheSize(int indexCacheSize)
Set the indexCacheSize
When set using Xbean, values of the form "20 Mb", "1024kb", and "1g" can be used
|
void |
setIndexLFUEvictionFactor(float indexLFUEvictionFactor) |
void |
setIndexWriteBatchSize(int indexWriteBatchSize)
Set the indexWriteBatchSize
When set using Xbean, values of the form "20 Mb", "1024kb", and "1g" can be used
|
void |
setJournalMaxFileLength(int journalMaxFileLength)
When set using Xbean, values of the form "20 Mb", "1024kb", and "1g" can
be used
|
void |
setJournalMaxWriteBatchSize(int journalMaxWriteBatchSize)
Set the journalMaxWriteBatchSize
* When set using Xbean, values of the form "20 Mb", "1024kb", and "1g" can be used
|
void |
setMaxAsyncJobs(int maxAsyncJobs) |
void |
setMaxFailoverProducersToTrack(int maxFailoverProducersToTrack)
Set the max number of producers (LRU cache) to track for duplicate sends
|
void |
setPreallocationScope(java.lang.String preallocationScope) |
void |
setPreallocationStrategy(java.lang.String preallocationStrategy) |
void |
setTransactionIdTransformer(TransactionIdTransformer transactionIdTransformer) |
void |
setUsageManager(SystemUsage usageManager) |
void |
setUseIndexLFRUEviction(boolean useIndexLFRUEviction) |
long |
size() |
java.lang.String |
toString() |
getBrokerService, getLocker, getLockKeepAlivePeriod, getScheduledThreadPoolExecutor, isUseLock, keepLockAlive, postStop, preStart, setLocker, setLockKeepAlivePeriod, setUseLock, stopBrokeraddServiceListener, dispose, isStarted, isStopped, isStopping, removeServiceListener, start, stoppublic void beginTransaction(ConnectionContext context) throws java.io.IOException
beginTransaction in interface PersistenceAdaptercontext - java.io.IOExceptionPersistenceAdapter.beginTransaction(org.apache.activemq.broker.ConnectionContext)public void checkpoint(boolean sync)
throws java.io.IOException
checkpoint in interface PersistenceAdaptersync - java.io.IOExceptionPersistenceAdapter.checkpoint(boolean)public void commitTransaction(ConnectionContext context) throws java.io.IOException
commitTransaction in interface PersistenceAdaptercontext - java.io.IOExceptionPersistenceAdapter.commitTransaction(org.apache.activemq.broker.ConnectionContext)public MessageStore createQueueMessageStore(ActiveMQQueue destination) throws java.io.IOException
createQueueMessageStore in interface PersistenceAdapterdestination - java.io.IOExceptionPersistenceAdapter.createQueueMessageStore(org.apache.activemq.command.ActiveMQQueue)public TopicMessageStore createTopicMessageStore(ActiveMQTopic destination) throws java.io.IOException
createTopicMessageStore in interface PersistenceAdapterdestination - java.io.IOExceptionPersistenceAdapter.createTopicMessageStore(org.apache.activemq.command.ActiveMQTopic)public TransactionStore createTransactionStore() throws java.io.IOException
createTransactionStore in interface PersistenceAdapterjava.io.IOExceptionPersistenceAdapter.createTransactionStore()public void deleteAllMessages()
throws java.io.IOException
deleteAllMessages in interface PersistenceAdapterjava.io.IOExceptionPersistenceAdapter.deleteAllMessages()public java.util.Set<ActiveMQDestination> getDestinations()
getDestinations in interface PersistenceAdapterPersistenceAdapter.getDestinations()public long getLastMessageBrokerSequenceId()
throws java.io.IOException
getLastMessageBrokerSequenceId in interface PersistenceAdapterjava.io.IOExceptionPersistenceAdapter.getLastMessageBrokerSequenceId()public long getLastProducerSequenceId(ProducerId id) throws java.io.IOException
getLastProducerSequenceId in interface PersistenceAdapterjava.io.IOExceptionpublic void removeQueueMessageStore(ActiveMQQueue destination)
removeQueueMessageStore in interface PersistenceAdapterdestination - PersistenceAdapter.removeQueueMessageStore(org.apache.activemq.command.ActiveMQQueue)public void removeTopicMessageStore(ActiveMQTopic destination)
removeTopicMessageStore in interface PersistenceAdapterdestination - PersistenceAdapter.removeTopicMessageStore(org.apache.activemq.command.ActiveMQTopic)public void rollbackTransaction(ConnectionContext context) throws java.io.IOException
rollbackTransaction in interface PersistenceAdaptercontext - java.io.IOExceptionPersistenceAdapter.rollbackTransaction(org.apache.activemq.broker.ConnectionContext)public void setBrokerName(java.lang.String brokerName)
setBrokerName in interface PersistenceAdapterbrokerName - PersistenceAdapter.setBrokerName(java.lang.String)public void setUsageManager(SystemUsage usageManager)
setUsageManager in interface PersistenceAdapterusageManager - PersistenceAdapter.setUsageManager(org.apache.activemq.usage.SystemUsage)public long size()
size in interface PersistenceAdapterPersistenceAdapter.size()public void doStart()
throws java.lang.Exception
doStart in class ServiceSupportjava.lang.ExceptionService.start()public void doStop(ServiceStopper stopper) throws java.lang.Exception
doStop in class ServiceSupportjava.lang.ExceptionService.stop()public int getJournalMaxFileLength()
getJournalMaxFileLength in interface JournaledStorepublic void setJournalMaxFileLength(int journalMaxFileLength)
public void setMaxFailoverProducersToTrack(int maxFailoverProducersToTrack)
public int getMaxFailoverProducersToTrack()
public void setFailoverProducersAuditDepth(int failoverProducersAuditDepth)
public int getFailoverProducersAuditDepth()
public long getCheckpointInterval()
public void setCheckpointInterval(long checkpointInterval)
checkpointInterval - the checkpointInterval to setpublic long getCleanupInterval()
public void setCleanupInterval(long cleanupInterval)
cleanupInterval - the cleanupInterval to setpublic int getIndexWriteBatchSize()
public void setIndexWriteBatchSize(int indexWriteBatchSize)
indexWriteBatchSize - the indexWriteBatchSize to setpublic int getJournalMaxWriteBatchSize()
public void setJournalMaxWriteBatchSize(int journalMaxWriteBatchSize)
journalMaxWriteBatchSize - the journalMaxWriteBatchSize to setpublic boolean isEnableIndexWriteAsync()
public void setEnableIndexWriteAsync(boolean enableIndexWriteAsync)
enableIndexWriteAsync - the enableIndexWriteAsync to setpublic java.io.File getDirectory()
getDirectory in interface PersistenceAdapterpublic void setDirectory(java.io.File dir)
setDirectory in interface PersistenceAdapterdir - PersistenceAdapter.setDirectory(java.io.File)public boolean isEnableJournalDiskSyncs()
public void setEnableJournalDiskSyncs(boolean enableJournalDiskSyncs)
enableJournalDiskSyncs - the enableJournalDiskSyncs to setpublic int getIndexCacheSize()
public void setIndexCacheSize(int indexCacheSize)
indexCacheSize - the indexCacheSize to setpublic boolean isIgnoreMissingJournalfiles()
public void setIgnoreMissingJournalfiles(boolean ignoreMissingJournalfiles)
ignoreMissingJournalfiles - the ignoreMissingJournalfiles to setpublic boolean isChecksumJournalFiles()
public boolean isCheckForCorruptJournalFiles()
public void setChecksumJournalFiles(boolean checksumJournalFiles)
public void setCheckForCorruptJournalFiles(boolean checkForCorruptJournalFiles)
public void setBrokerService(BrokerService brokerService)
setBrokerService in interface BrokerServiceAwaresetBrokerService in class LockableServiceSupportpublic java.lang.String getPreallocationScope()
public void setPreallocationScope(java.lang.String preallocationScope)
public java.lang.String getPreallocationStrategy()
public void setPreallocationStrategy(java.lang.String preallocationStrategy)
public boolean isArchiveDataLogs()
public void setArchiveDataLogs(boolean archiveDataLogs)
public java.io.File getDirectoryArchive()
public void setDirectoryArchive(java.io.File directoryArchive)
public boolean isConcurrentStoreAndDispatchQueues()
public void setConcurrentStoreAndDispatchQueues(boolean concurrentStoreAndDispatch)
public boolean isConcurrentStoreAndDispatchTopics()
public void setConcurrentStoreAndDispatchTopics(boolean concurrentStoreAndDispatch)
public int getMaxAsyncJobs()
public void setMaxAsyncJobs(int maxAsyncJobs)
maxAsyncJobs - the maxAsyncJobs to set@Deprecated
public void setDatabaseLockedWaitDelay(int databaseLockedWaitDelay)
throws java.io.IOException
Locker.setLockAcquireSleepInterval(long) insteaddatabaseLockedWaitDelay - the databaseLockedWaitDelay to setjava.io.IOExceptionpublic boolean getForceRecoverIndex()
public void setForceRecoverIndex(boolean forceRecoverIndex)
public boolean isArchiveCorruptedIndex()
public void setArchiveCorruptedIndex(boolean archiveCorruptedIndex)
public float getIndexLFUEvictionFactor()
public void setIndexLFUEvictionFactor(float indexLFUEvictionFactor)
public boolean isUseIndexLFRUEviction()
public void setUseIndexLFRUEviction(boolean useIndexLFRUEviction)
public void setEnableIndexDiskSyncs(boolean diskSyncs)
public boolean isEnableIndexDiskSyncs()
public void setEnableIndexRecoveryFile(boolean enable)
public boolean isEnableIndexRecoveryFile()
public void setEnableIndexPageCaching(boolean enable)
public boolean isEnableIndexPageCaching()
public KahaDBStore getStore()
public KahaTransactionInfo createTransactionInfo(TransactionId txid)
public Locker createDefaultLocker() throws java.io.IOException
createDefaultLocker in interface Lockablejava.io.IOExceptionpublic void init()
throws java.lang.Exception
init in class LockableServiceSupportjava.lang.Exceptionpublic java.lang.String toString()
toString in class java.lang.Objectpublic void setTransactionIdTransformer(TransactionIdTransformer transactionIdTransformer)
setTransactionIdTransformer in interface TransactionIdTransformerAwareCopyright © 2005-2016 Red Hat, Inc.. All Rights Reserved.