Package org.apache.activemq.store.kahadb
Class KahaDBPersistenceAdapter
- java.lang.Object
-
- org.apache.activemq.util.ServiceSupport
-
- org.apache.activemq.broker.LockableServiceSupport
-
- org.apache.activemq.store.kahadb.KahaDBPersistenceAdapter
-
- All Implemented Interfaces:
BrokerServiceAware,Lockable,Service,JournaledStore,NoLocalSubscriptionAware,PersistenceAdapter,TransactionIdTransformerAware
public class KahaDBPersistenceAdapter extends LockableServiceSupport implements PersistenceAdapter, JournaledStore, TransactionIdTransformerAware, NoLocalSubscriptionAware
An implementation ofPersistenceAdapterdesigned for use with KahaDB - Embedded Lightweight Non-Relational Database
-
-
Field Summary
-
Fields inherited from class org.apache.activemq.broker.LockableServiceSupport
brokerService, clockDaemon
-
-
Constructor Summary
Constructors Constructor Description KahaDBPersistenceAdapter()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidallowIOResumption()voidbeginTransaction(ConnectionContext context)This method starts a transaction on the persistent storage - which is nothing to do with JMS or XA transactions - its purely a mechanism to perform multiple writes to a persistent store in 1 transaction as a performance optimization.voidcheckpoint(boolean cleanup)checkpoint anyvoidcommitTransaction(ConnectionContext context)Commit a persistence transactionLockercreateDefaultLocker()Create a default lockerJobSchedulerStorecreateJobSchedulerStore()Creates and returns a new Job Scheduler store instance.MessageStorecreateQueueMessageStore(ActiveMQQueue destination)Factory method to create a new queue message store with the given destination nameTopicMessageStorecreateTopicMessageStore(ActiveMQTopic destination)Factory method to create a new topic message store with the given destination nameKahaTransactionInfocreateTransactionInfo(TransactionId txid)TransactionStorecreateTransactionStore()Factory method to create a new persistent prepared transaction store for XA recoveryvoiddeleteAllMessages()Delete's all the messages in the persistent store.voiddoStart()voiddoStop(ServiceStopper stopper)longgetCheckpointInterval()Get the checkpointIntervallonggetCleanupInterval()Get the cleanupIntervalbooleangetCleanupOnStop()intgetCompactAcksAfterNoGC()Set<ActiveMQDestination>getDestinations()Returns a set of all theActiveMQDestinationobjects that the persistence store is aware exist.FilegetDirectory()Get the directoryFilegetDirectoryArchive()intgetFailoverProducersAuditDepth()booleangetForceRecoverIndex()intgetIndexCacheSize()Get the indexCacheSizeFilegetIndexDirectory()floatgetIndexLFUEvictionFactor()intgetIndexWriteBatchSize()Get the indexWriteBatchSizelonggetJournalDiskSyncInterval()StringgetJournalDiskSyncStrategy()Journal.JournalDiskSyncStrategygetJournalDiskSyncStrategyEnum()intgetJournalMaxFileLength()Get the journalMaxFileLengthintgetJournalMaxWriteBatchSize()Get the journalMaxWriteBatchSizelonggetLastMessageBrokerSequenceId()longgetLastProducerSequenceId(ProducerId id)return the last stored producer sequenceId for this producer Id used to suppress duplicate sends on failover reconnect at the transport when a reconnect occursintgetMaxAsyncJobs()intgetMaxFailoverProducersToTrack()PersistenceAdapterStatisticsgetPersistenceAdapterStatistics()Get the PersistenceAdapterStatisticsStringgetPreallocationScope()StringgetPreallocationStrategy()StringgetPurgeRecoveredXATransactionStrategy()KahaDBStoregetStore()voidinit()Initialize resources before lockingbooleanisArchiveCorruptedIndex()booleanisArchiveDataLogs()booleanisCheckForCorruptJournalFiles()booleanisChecksumJournalFiles()booleanisCompactAcksIgnoresStoreGrowth()booleanisConcurrentStoreAndDispatchQueues()booleanisConcurrentStoreAndDispatchTopics()booleanisEnableAckCompaction()Returns whether Ack compaction is enabledbooleanisEnableIndexDiskSyncs()booleanisEnableIndexPageCaching()booleanisEnableIndexRecoveryFile()booleanisEnableIndexWriteAsync()Get the enableIndexWriteAsyncbooleanisEnableJournalDiskSyncs()Deprecated.usegetJournalDiskSyncStrategy()insteadbooleanisEnableSubscriptionStatistics()Whether non-blocking subscription statistics have been enabledbooleanisIgnoreMissingJournalfiles()Get the ignoreMissingJournalfilesbooleanisPersistNoLocal()booleanisUseIndexLFRUEviction()voidremoveQueueMessageStore(ActiveMQQueue destination)Cleanup method to remove any state associated with the given destination.voidremoveTopicMessageStore(ActiveMQTopic destination)Cleanup method to remove any state associated with the given destination This method does not stop the message store (it might not be cached).voidrollbackTransaction(ConnectionContext context)Rollback a persistence transactionvoidsetArchiveCorruptedIndex(boolean archiveCorruptedIndex)voidsetArchiveDataLogs(boolean archiveDataLogs)voidsetBrokerName(String brokerName)Set the name of the broker using the adaptervoidsetBrokerService(BrokerService brokerService)voidsetCheckForCorruptJournalFiles(boolean checkForCorruptJournalFiles)voidsetCheckpointInterval(long checkpointInterval)Set the checkpointIntervalvoidsetChecksumJournalFiles(boolean checksumJournalFiles)voidsetCleanupInterval(long cleanupInterval)Set the cleanupIntervalvoidsetCleanupOnStop(boolean cleanupOnStop)voidsetCompactAcksAfterNoGC(int compactAcksAfterNoGC)Sets the number of GC cycles where no journal logs were removed before an attempt to move forward all the acks in the last log that contains them and is otherwise unreferenced.voidsetCompactAcksIgnoresStoreGrowth(boolean compactAcksIgnoresStoreGrowth)Configure if Ack compaction will occur regardless of continued growth of the journal logs meaning that the store has not run out of space yet.voidsetConcurrentStoreAndDispatchQueues(boolean concurrentStoreAndDispatch)voidsetConcurrentStoreAndDispatchTopics(boolean concurrentStoreAndDispatch)voidsetDatabaseLockedWaitDelay(int databaseLockedWaitDelay)Deprecated.useLocker.setLockAcquireSleepInterval(long)insteadvoidsetDirectory(File dir)Set the directory where any data files should be createdvoidsetDirectoryArchive(File directoryArchive)voidsetEnableAckCompaction(boolean enableAckCompaction)Configure if the Ack compaction task should be enabled to runvoidsetEnableIndexDiskSyncs(boolean diskSyncs)voidsetEnableIndexPageCaching(boolean enable)voidsetEnableIndexRecoveryFile(boolean enable)voidsetEnableIndexWriteAsync(boolean enableIndexWriteAsync)Set the enableIndexWriteAsyncvoidsetEnableJournalDiskSyncs(boolean enableJournalDiskSyncs)Deprecated.usesetJournalDiskSyncStrategy(java.lang.String)insteadvoidsetEnableSubscriptionStatistics(boolean enableSubscriptionStatistics)Enable caching statistics for each subscription to allow non-blocking retrieval of metrics.voidsetFailoverProducersAuditDepth(int failoverProducersAuditDepth)set the audit window depth for duplicate suppression (should exceed the max transaction batch)voidsetForceRecoverIndex(boolean forceRecoverIndex)voidsetIgnoreMissingJournalfiles(boolean ignoreMissingJournalfiles)Set the ignoreMissingJournalfilesvoidsetIndexCacheSize(int indexCacheSize)Set the indexCacheSize When set using Xbean, values of the form "20 Mb", "1024kb", and "1g" can be usedvoidsetIndexDirectory(File indexDirectory)Sets the directory where KahaDB index files should be written.voidsetIndexLFUEvictionFactor(float indexLFUEvictionFactor)voidsetIndexWriteBatchSize(int indexWriteBatchSize)Set the indexWriteBatchSize When set using Xbean, values of the form "20 Mb", "1024kb", and "1g" can be usedvoidsetJournalDiskSyncInterval(long journalDiskSyncInterval)voidsetJournalDiskSyncStrategy(String journalDiskSyncStrategy)voidsetJournalMaxFileLength(int journalMaxFileLength)When set using Xbean, values of the form "20 Mb", "1024kb", and "1g" can be usedvoidsetJournalMaxWriteBatchSize(int journalMaxWriteBatchSize)Set the journalMaxWriteBatchSize * When set using Xbean, values of the form "20 Mb", "1024kb", and "1g" can be usedvoidsetMaxAsyncJobs(int maxAsyncJobs)voidsetMaxFailoverProducersToTrack(int maxFailoverProducersToTrack)Set the max number of producers (LRU cache) to track for duplicate sendsvoidsetPreallocationScope(String preallocationScope)voidsetPreallocationStrategy(String preallocationStrategy)voidsetPurgeRecoveredXATransactionStrategy(String purgeRecoveredXATransactionStrategy)voidsetTransactionIdTransformer(TransactionIdTransformer transactionIdTransformer)voidsetUsageManager(SystemUsage usageManager)voidsetUseIndexLFRUEviction(boolean useIndexLFRUEviction)longsize()A hint to return the size of the store on diskStringtoString()-
Methods inherited from class org.apache.activemq.broker.LockableServiceSupport
getBrokerService, getLocker, getLockKeepAlivePeriod, getScheduledThreadPoolExecutor, isStopOnError, isUseLock, keepLockAlive, postStop, preStart, setLocker, setLockKeepAlivePeriod, setScheduledThreadPoolExecutor, setStopOnError, setUseLock, stopBroker
-
Methods inherited from class org.apache.activemq.util.ServiceSupport
addServiceListener, dispose, isStarted, isStopped, isStopping, removeServiceListener, start, stop
-
-
-
-
Method Detail
-
beginTransaction
public void beginTransaction(ConnectionContext context) throws IOException
Description copied from interface:PersistenceAdapterThis method starts a transaction on the persistent storage - which is nothing to do with JMS or XA transactions - its purely a mechanism to perform multiple writes to a persistent store in 1 transaction as a performance optimization. Typically one transaction will require one disk synchronization point and so for real high performance its usually faster to perform many writes within the same transaction to minimize latency caused by disk synchronization. This is especially true when using tools like Berkeley Db or embedded JDBC servers.- Specified by:
beginTransactionin interfacePersistenceAdapter- Parameters:
context-- Throws:
IOException- See Also:
PersistenceAdapter.beginTransaction(org.apache.activemq.broker.ConnectionContext)
-
checkpoint
public void checkpoint(boolean cleanup) throws IOExceptionDescription copied from interface:PersistenceAdaptercheckpoint any- Specified by:
checkpointin interfacePersistenceAdapter- Parameters:
cleanup-- Throws:
IOException- See Also:
PersistenceAdapter.checkpoint(boolean)
-
commitTransaction
public void commitTransaction(ConnectionContext context) throws IOException
Description copied from interface:PersistenceAdapterCommit a persistence transaction- Specified by:
commitTransactionin interfacePersistenceAdapter- Parameters:
context-- Throws:
IOException- See Also:
PersistenceAdapter.commitTransaction(org.apache.activemq.broker.ConnectionContext)
-
createQueueMessageStore
public MessageStore createQueueMessageStore(ActiveMQQueue destination) throws IOException
Description copied from interface:PersistenceAdapterFactory method to create a new queue message store with the given destination name- Specified by:
createQueueMessageStorein interfacePersistenceAdapter- Parameters:
destination-- Returns:
- MessageStore
- Throws:
IOException- See Also:
PersistenceAdapter.createQueueMessageStore(org.apache.activemq.command.ActiveMQQueue)
-
createTopicMessageStore
public TopicMessageStore createTopicMessageStore(ActiveMQTopic destination) throws IOException
Description copied from interface:PersistenceAdapterFactory method to create a new topic message store with the given destination name- Specified by:
createTopicMessageStorein interfacePersistenceAdapter- Parameters:
destination-- Returns:
- TopicMessageStore
- Throws:
IOException- See Also:
PersistenceAdapter.createTopicMessageStore(org.apache.activemq.command.ActiveMQTopic)
-
createTransactionStore
public TransactionStore createTransactionStore() throws IOException
Description copied from interface:PersistenceAdapterFactory method to create a new persistent prepared transaction store for XA recovery- Specified by:
createTransactionStorein interfacePersistenceAdapter- Returns:
- TransactionStore
- Throws:
IOException- See Also:
PersistenceAdapter.createTransactionStore()
-
deleteAllMessages
public void deleteAllMessages() throws IOExceptionDescription copied from interface:PersistenceAdapterDelete's all the messages in the persistent store.- Specified by:
deleteAllMessagesin interfacePersistenceAdapter- Throws:
IOException- See Also:
PersistenceAdapter.deleteAllMessages()
-
getDestinations
public Set<ActiveMQDestination> getDestinations()
Description copied from interface:PersistenceAdapterReturns a set of all theActiveMQDestinationobjects that the persistence store is aware exist.- Specified by:
getDestinationsin interfacePersistenceAdapter- Returns:
- destinations
- See Also:
PersistenceAdapter.getDestinations()
-
getLastMessageBrokerSequenceId
public long getLastMessageBrokerSequenceId() throws IOException- Specified by:
getLastMessageBrokerSequenceIdin interfacePersistenceAdapter- Returns:
- lastMessageBrokerSequenceId
- Throws:
IOException- See Also:
PersistenceAdapter.getLastMessageBrokerSequenceId()
-
getLastProducerSequenceId
public long getLastProducerSequenceId(ProducerId id) throws IOException
Description copied from interface:PersistenceAdapterreturn the last stored producer sequenceId for this producer Id used to suppress duplicate sends on failover reconnect at the transport when a reconnect occurs- Specified by:
getLastProducerSequenceIdin interfacePersistenceAdapter- Parameters:
id- the producerId to find a sequenceId for- Returns:
- the last stored sequence id or -1 if no suppression needed
- Throws:
IOException
-
allowIOResumption
public void allowIOResumption()
- Specified by:
allowIOResumptionin interfacePersistenceAdapter
-
removeQueueMessageStore
public void removeQueueMessageStore(ActiveMQQueue destination)
Description copied from interface:PersistenceAdapterCleanup method to remove any state associated with the given destination. This method does not stop the message store (it might not be cached).- Specified by:
removeQueueMessageStorein interfacePersistenceAdapter- Parameters:
destination-- See Also:
PersistenceAdapter.removeQueueMessageStore(org.apache.activemq.command.ActiveMQQueue)
-
removeTopicMessageStore
public void removeTopicMessageStore(ActiveMQTopic destination)
Description copied from interface:PersistenceAdapterCleanup method to remove any state associated with the given destination This method does not stop the message store (it might not be cached).- Specified by:
removeTopicMessageStorein interfacePersistenceAdapter- Parameters:
destination-- See Also:
PersistenceAdapter.removeTopicMessageStore(org.apache.activemq.command.ActiveMQTopic)
-
rollbackTransaction
public void rollbackTransaction(ConnectionContext context) throws IOException
Description copied from interface:PersistenceAdapterRollback a persistence transaction- Specified by:
rollbackTransactionin interfacePersistenceAdapter- Parameters:
context-- Throws:
IOException- See Also:
PersistenceAdapter.rollbackTransaction(org.apache.activemq.broker.ConnectionContext)
-
setBrokerName
public void setBrokerName(String brokerName)
Description copied from interface:PersistenceAdapterSet the name of the broker using the adapter- Specified by:
setBrokerNamein interfacePersistenceAdapter- Parameters:
brokerName-- See Also:
PersistenceAdapter.setBrokerName(java.lang.String)
-
setUsageManager
public void setUsageManager(SystemUsage usageManager)
- Specified by:
setUsageManagerin interfacePersistenceAdapter- Parameters:
usageManager-- See Also:
PersistenceAdapter.setUsageManager(org.apache.activemq.usage.SystemUsage)
-
size
public long size()
Description copied from interface:PersistenceAdapterA hint to return the size of the store on disk- Specified by:
sizein interfacePersistenceAdapter- Returns:
- the size of the store
- See Also:
PersistenceAdapter.size()
-
doStart
public void doStart() throws Exception- Specified by:
doStartin classServiceSupport- Throws:
Exception- See Also:
Service.start()
-
doStop
public void doStop(ServiceStopper stopper) throws Exception
- Specified by:
doStopin classServiceSupport- Throws:
Exception- See Also:
Service.stop()
-
getJournalMaxFileLength
public int getJournalMaxFileLength()
Get the journalMaxFileLength- Specified by:
getJournalMaxFileLengthin interfaceJournaledStore- Returns:
- the journalMaxFileLength
-
setJournalMaxFileLength
public void setJournalMaxFileLength(int journalMaxFileLength)
When set using Xbean, values of the form "20 Mb", "1024kb", and "1g" can be used
-
setMaxFailoverProducersToTrack
public void setMaxFailoverProducersToTrack(int maxFailoverProducersToTrack)
Set the max number of producers (LRU cache) to track for duplicate sends
-
getMaxFailoverProducersToTrack
public int getMaxFailoverProducersToTrack()
-
setFailoverProducersAuditDepth
public void setFailoverProducersAuditDepth(int failoverProducersAuditDepth)
set the audit window depth for duplicate suppression (should exceed the max transaction batch)
-
getFailoverProducersAuditDepth
public int getFailoverProducersAuditDepth()
-
getCheckpointInterval
public long getCheckpointInterval()
Get the checkpointInterval- Returns:
- the checkpointInterval
-
setCheckpointInterval
public void setCheckpointInterval(long checkpointInterval)
Set the checkpointInterval- Parameters:
checkpointInterval- the checkpointInterval to set
-
getCleanupInterval
public long getCleanupInterval()
Get the cleanupInterval- Returns:
- the cleanupInterval
-
setCleanupInterval
public void setCleanupInterval(long cleanupInterval)
Set the cleanupInterval- Parameters:
cleanupInterval- the cleanupInterval to set
-
getIndexWriteBatchSize
public int getIndexWriteBatchSize()
Get the indexWriteBatchSize- Returns:
- the indexWriteBatchSize
-
setIndexWriteBatchSize
public void setIndexWriteBatchSize(int indexWriteBatchSize)
Set the indexWriteBatchSize When set using Xbean, values of the form "20 Mb", "1024kb", and "1g" can be used- Parameters:
indexWriteBatchSize- the indexWriteBatchSize to set
-
getJournalMaxWriteBatchSize
public int getJournalMaxWriteBatchSize()
Get the journalMaxWriteBatchSize- Returns:
- the journalMaxWriteBatchSize
-
setJournalMaxWriteBatchSize
public void setJournalMaxWriteBatchSize(int journalMaxWriteBatchSize)
Set the journalMaxWriteBatchSize * When set using Xbean, values of the form "20 Mb", "1024kb", and "1g" can be used- Parameters:
journalMaxWriteBatchSize- the journalMaxWriteBatchSize to set
-
isEnableIndexWriteAsync
public boolean isEnableIndexWriteAsync()
Get the enableIndexWriteAsync- Returns:
- the enableIndexWriteAsync
-
setEnableIndexWriteAsync
public void setEnableIndexWriteAsync(boolean enableIndexWriteAsync)
Set the enableIndexWriteAsync- Parameters:
enableIndexWriteAsync- the enableIndexWriteAsync to set
-
getPersistenceAdapterStatistics
public PersistenceAdapterStatistics getPersistenceAdapterStatistics()
Get the PersistenceAdapterStatistics- Returns:
- the persistenceAdapterStatistics
-
getDirectory
public File getDirectory()
Get the directory- Specified by:
getDirectoryin interfacePersistenceAdapter- Returns:
- the directory
-
setDirectory
public void setDirectory(File dir)
Description copied from interface:PersistenceAdapterSet the directory where any data files should be created- Specified by:
setDirectoryin interfacePersistenceAdapter- Parameters:
dir-- See Also:
PersistenceAdapter.setDirectory(java.io.File)
-
getIndexDirectory
public File getIndexDirectory()
- Returns:
- the currently configured location of the KahaDB index files.
-
setIndexDirectory
public void setIndexDirectory(File indexDirectory)
Sets the directory where KahaDB index files should be written.- Parameters:
indexDirectory- the directory where the KahaDB store index files should be written.
-
isEnableJournalDiskSyncs
public boolean isEnableJournalDiskSyncs()
Deprecated.usegetJournalDiskSyncStrategy()insteadGet the enableJournalDiskSyncs- Returns:
- the enableJournalDiskSyncs
-
setEnableJournalDiskSyncs
public void setEnableJournalDiskSyncs(boolean enableJournalDiskSyncs)
Deprecated.usesetJournalDiskSyncStrategy(java.lang.String)insteadSet the enableJournalDiskSyncs- Parameters:
enableJournalDiskSyncs- the enableJournalDiskSyncs to set
-
getJournalDiskSyncStrategy
public String getJournalDiskSyncStrategy()
- Returns:
-
getJournalDiskSyncStrategyEnum
public Journal.JournalDiskSyncStrategy getJournalDiskSyncStrategyEnum()
-
setJournalDiskSyncStrategy
public void setJournalDiskSyncStrategy(String journalDiskSyncStrategy)
- Parameters:
journalDiskSyncStrategy-
-
getJournalDiskSyncInterval
public long getJournalDiskSyncInterval()
- Returns:
-
setJournalDiskSyncInterval
public void setJournalDiskSyncInterval(long journalDiskSyncInterval)
- Parameters:
journalDiskSyncInterval-
-
getIndexCacheSize
public int getIndexCacheSize()
Get the indexCacheSize- Returns:
- the indexCacheSize
-
setIndexCacheSize
public void setIndexCacheSize(int indexCacheSize)
Set the indexCacheSize When set using Xbean, values of the form "20 Mb", "1024kb", and "1g" can be used- Parameters:
indexCacheSize- the indexCacheSize to set
-
isIgnoreMissingJournalfiles
public boolean isIgnoreMissingJournalfiles()
Get the ignoreMissingJournalfiles- Returns:
- the ignoreMissingJournalfiles
-
setIgnoreMissingJournalfiles
public void setIgnoreMissingJournalfiles(boolean ignoreMissingJournalfiles)
Set the ignoreMissingJournalfiles- Parameters:
ignoreMissingJournalfiles- the ignoreMissingJournalfiles to set
-
isChecksumJournalFiles
public boolean isChecksumJournalFiles()
-
isCheckForCorruptJournalFiles
public boolean isCheckForCorruptJournalFiles()
-
setChecksumJournalFiles
public void setChecksumJournalFiles(boolean checksumJournalFiles)
-
setCheckForCorruptJournalFiles
public void setCheckForCorruptJournalFiles(boolean checkForCorruptJournalFiles)
-
getPurgeRecoveredXATransactionStrategy
public String getPurgeRecoveredXATransactionStrategy()
-
setPurgeRecoveredXATransactionStrategy
public void setPurgeRecoveredXATransactionStrategy(String purgeRecoveredXATransactionStrategy)
-
setBrokerService
public void setBrokerService(BrokerService brokerService)
- Specified by:
setBrokerServicein interfaceBrokerServiceAware- Overrides:
setBrokerServicein classLockableServiceSupport
-
getPreallocationScope
public String getPreallocationScope()
-
setPreallocationScope
public void setPreallocationScope(String preallocationScope)
-
getPreallocationStrategy
public String getPreallocationStrategy()
-
setPreallocationStrategy
public void setPreallocationStrategy(String preallocationStrategy)
-
isArchiveDataLogs
public boolean isArchiveDataLogs()
-
setArchiveDataLogs
public void setArchiveDataLogs(boolean archiveDataLogs)
-
getDirectoryArchive
public File getDirectoryArchive()
-
setDirectoryArchive
public void setDirectoryArchive(File directoryArchive)
-
isConcurrentStoreAndDispatchQueues
public boolean isConcurrentStoreAndDispatchQueues()
-
setConcurrentStoreAndDispatchQueues
public void setConcurrentStoreAndDispatchQueues(boolean concurrentStoreAndDispatch)
-
isConcurrentStoreAndDispatchTopics
public boolean isConcurrentStoreAndDispatchTopics()
-
setConcurrentStoreAndDispatchTopics
public void setConcurrentStoreAndDispatchTopics(boolean concurrentStoreAndDispatch)
-
getMaxAsyncJobs
public int getMaxAsyncJobs()
-
setMaxAsyncJobs
public void setMaxAsyncJobs(int maxAsyncJobs)
- Parameters:
maxAsyncJobs- the maxAsyncJobs to set
-
setDatabaseLockedWaitDelay
@Deprecated public void setDatabaseLockedWaitDelay(int databaseLockedWaitDelay) throws IOException
Deprecated.useLocker.setLockAcquireSleepInterval(long)instead- Parameters:
databaseLockedWaitDelay- the databaseLockedWaitDelay to set- Throws:
IOException
-
getForceRecoverIndex
public boolean getForceRecoverIndex()
-
setForceRecoverIndex
public void setForceRecoverIndex(boolean forceRecoverIndex)
-
isArchiveCorruptedIndex
public boolean isArchiveCorruptedIndex()
-
setArchiveCorruptedIndex
public void setArchiveCorruptedIndex(boolean archiveCorruptedIndex)
-
getIndexLFUEvictionFactor
public float getIndexLFUEvictionFactor()
-
setIndexLFUEvictionFactor
public void setIndexLFUEvictionFactor(float indexLFUEvictionFactor)
-
isUseIndexLFRUEviction
public boolean isUseIndexLFRUEviction()
-
setUseIndexLFRUEviction
public void setUseIndexLFRUEviction(boolean useIndexLFRUEviction)
-
setEnableIndexDiskSyncs
public void setEnableIndexDiskSyncs(boolean diskSyncs)
-
isEnableIndexDiskSyncs
public boolean isEnableIndexDiskSyncs()
-
setEnableIndexRecoveryFile
public void setEnableIndexRecoveryFile(boolean enable)
-
isEnableIndexRecoveryFile
public boolean isEnableIndexRecoveryFile()
-
setEnableIndexPageCaching
public void setEnableIndexPageCaching(boolean enable)
-
isEnableIndexPageCaching
public boolean isEnableIndexPageCaching()
-
getCompactAcksAfterNoGC
public int getCompactAcksAfterNoGC()
-
setCompactAcksAfterNoGC
public void setCompactAcksAfterNoGC(int compactAcksAfterNoGC)
Sets the number of GC cycles where no journal logs were removed before an attempt to move forward all the acks in the last log that contains them and is otherwise unreferenced.A value of -1 will disable this feature.
- Parameters:
compactAcksAfterNoGC- Number of empty GC cycles before we rewrite old ACKS.
-
isCompactAcksIgnoresStoreGrowth
public boolean isCompactAcksIgnoresStoreGrowth()
-
setCompactAcksIgnoresStoreGrowth
public void setCompactAcksIgnoresStoreGrowth(boolean compactAcksIgnoresStoreGrowth)
Configure if Ack compaction will occur regardless of continued growth of the journal logs meaning that the store has not run out of space yet. Because the compaction operation can be costly this value is defaulted to off and the Ack compaction is only done when it seems that the store cannot grow and larger.- Parameters:
compactAcksIgnoresStoreGrowth- the compactAcksIgnoresStoreGrowth to set
-
isEnableAckCompaction
public boolean isEnableAckCompaction()
Returns whether Ack compaction is enabled- Returns:
- enableAckCompaction
-
setEnableAckCompaction
public void setEnableAckCompaction(boolean enableAckCompaction)
Configure if the Ack compaction task should be enabled to run- Parameters:
enableAckCompaction-
-
isEnableSubscriptionStatistics
public boolean isEnableSubscriptionStatistics()
Whether non-blocking subscription statistics have been enabled- Returns:
-
setEnableSubscriptionStatistics
public void setEnableSubscriptionStatistics(boolean enableSubscriptionStatistics)
Enable caching statistics for each subscription to allow non-blocking retrieval of metrics. This could incur some overhead to compute if there are a lot of subscriptions.- Parameters:
enableSubscriptionStatistics-
-
getStore
public KahaDBStore getStore()
-
createTransactionInfo
public KahaTransactionInfo createTransactionInfo(TransactionId txid)
-
createDefaultLocker
public Locker createDefaultLocker() throws IOException
Description copied from interface:LockableCreate a default locker- Specified by:
createDefaultLockerin interfaceLockable- Returns:
- default locker
- Throws:
IOException
-
init
public void init() throws ExceptionDescription copied from class:LockableServiceSupportInitialize resources before locking- Specified by:
initin classLockableServiceSupport- Throws:
Exception
-
setTransactionIdTransformer
public void setTransactionIdTransformer(TransactionIdTransformer transactionIdTransformer)
- Specified by:
setTransactionIdTransformerin interfaceTransactionIdTransformerAware
-
createJobSchedulerStore
public JobSchedulerStore createJobSchedulerStore() throws IOException, UnsupportedOperationException
Description copied from interface:PersistenceAdapterCreates and returns a new Job Scheduler store instance.- Specified by:
createJobSchedulerStorein interfacePersistenceAdapter- Returns:
- a new JobSchedulerStore instance if this Persistence adapter provides its own.
- Throws:
IOException- If an error occurs while creating the new JobSchedulerStore.UnsupportedOperationException- If this adapter does not provide its own scheduler store implementation.
-
isPersistNoLocal
public boolean isPersistNoLocal()
- Specified by:
isPersistNoLocalin interfaceNoLocalSubscriptionAware
-
setCleanupOnStop
public void setCleanupOnStop(boolean cleanupOnStop)
-
getCleanupOnStop
public boolean getCleanupOnStop()
-
-