Package org.apache.activemq.store.kahadb
Class KahaDBStore
java.lang.Object
org.apache.activemq.util.ServiceSupport
org.apache.activemq.store.kahadb.MessageDatabase
org.apache.activemq.store.kahadb.KahaDBStore
- All Implemented Interfaces:
org.apache.activemq.broker.BrokerServiceAware,org.apache.activemq.Service,org.apache.activemq.store.NoLocalSubscriptionAware,org.apache.activemq.store.PersistenceAdapter
public class KahaDBStore
extends MessageDatabase
implements org.apache.activemq.store.PersistenceAdapter, org.apache.activemq.store.NoLocalSubscriptionAware
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassstatic interfacestatic classNested classes/interfaces inherited from class org.apache.activemq.store.kahadb.MessageDatabase
MessageDatabase.MessageStoreStatisticsMarshaller, MessageDatabase.PurgeRecoveredXATransactionStrategy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final Stringstatic final Stringprotected ExecutorServiceprotected ExecutorServiceFields inherited from class org.apache.activemq.store.kahadb.MessageDatabase
archiveDataLogs, brokerService, DEFAULT_DIRECTORY, deleteAllMessages, directory, directoryArchive, failIfDatabaseIsLocked, forceRecoverIndex, indexDirectory, indexLock, journal, journalDiskSyncStrategy, journalSize, lastAsyncJournalUpdate, LOG_SLOW_ACCESS_TIME, opened, pageFile, persistenceAdapterStatistics, PROPERTY_LOG_SLOW_ACCESS_TIME, purgeRecoveredXATransactionStrategy, scheduler, storeCache, UNMATCHED -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbeginTransaction(org.apache.activemq.broker.ConnectionContext context) voidcheckpoint(boolean sync) voidcommitTransaction(org.apache.activemq.broker.ConnectionContext context) protected voidorg.apache.activemq.broker.scheduler.JobSchedulerStoreorg.apache.activemq.store.MessageStorecreateQueueMessageStore(org.apache.activemq.command.ActiveMQQueue destination) org.apache.activemq.store.TopicMessageStorecreateTopicMessageStore(org.apache.activemq.command.ActiveMQTopic destination) org.apache.activemq.store.TransactionStorevoidvoiddoStart()voiddoStop(org.apache.activemq.util.ServiceStopper stopper) voidforgetRecoveredAcks(ArrayList<org.apache.activemq.command.MessageAck> preparedAcks, boolean isRollback) Set<org.apache.activemq.command.ActiveMQDestination>booleanlonglonggetLastProducerSequenceId(org.apache.activemq.command.ProducerId id) intorg.apache.activemq.store.TransactionIdTransformerorg.apache.activemq.usage.SystemUsagebooleanbooleanbooleanvoidremoveQueueMessageStore(org.apache.activemq.command.ActiveMQQueue destination) Cleanup method to remove any state associated with the given destination.voidremoveTopicMessageStore(org.apache.activemq.command.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(org.apache.activemq.broker.ConnectionContext context) voidsetBrokerName(String brokerName) voidsetConcurrentStoreAndDispatchQueues(boolean concurrentStoreAndDispatch) voidsetConcurrentStoreAndDispatchTopics(boolean concurrentStoreAndDispatch) voidsetForceRecoverIndex(boolean forceRecoverIndex) voidsetMaxAsyncJobs(int maxAsyncJobs) voidsetTransactionIdTransformer(org.apache.activemq.store.TransactionIdTransformer transactionIdTransformer) voidsetUsageManager(org.apache.activemq.usage.SystemUsage usageManager) longsize()toString()voidtrackRecoveredAcks(ArrayList<org.apache.activemq.command.MessageAck> preparedAcks) Methods inherited from class org.apache.activemq.store.kahadb.MessageDatabase
allowIOResumption, checkpointCleanup, clearStoreStats, close, createJournal, decrementAndSubSizeToStoreStat, decrementAndSubSizeToStoreStat, decrementAndSubSizeToStoreStat, getCheckpointInterval, getCleanupInterval, getCleanupOnStop, getCompactAcksAfterNoGC, getDirectory, getDirectoryArchive, getFailoverProducersAuditDepth, getIndexCacheSize, getIndexDirectory, getIndexLFUEvictionFactor, getIndexWriteBatchSize, getInProgressTxLocationRange, getJournal, getJournalDiskSyncInterval, getJournalDiskSyncStrategy, getJournalDiskSyncStrategyEnum, getJournalMaxFileLength, getJournalMaxWriteBatchSize, getMaxFailoverProducersToTrack, getPageFile, getPersistenceAdapterStatistics, getPreallocationScope, getPreallocationStrategy, getPreparedTransaction, getPurgeRecoveredXATransactionStrategy, getPurgeRecoveredXATransactionStrategyEnum, getStoreStats, getSubStats, getTransactions, incrementAndAddSizeToStoreStat, incrementAndAddSizeToStoreStat, incrementAndAddSizeToStoreStat, isArchiveCorruptedIndex, isArchiveDataLogs, isCheckForCorruptJournalFiles, isChecksumJournalFiles, isCompactAcksIgnoresStoreGrowth, isDeleteAllMessages, isEnableAckCompaction, isEnableIndexDiskSyncs, isEnableIndexPageCaching, isEnableIndexRecoveryFile, isEnableJournalDiskSyncs, isEnableSubscriptionStatistics, isFailIfDatabaseIsLocked, isIgnoreMissingJournalfiles, isUseIndexLFRUEviction, key, load, load, open, process, process, process, process, process, process, process, processLocation, recoverIndex, setArchiveCorruptedIndex, setArchiveDataLogs, setBrokerService, setCheckForCorruptJournalFiles, setCheckpointInterval, setChecksumJournalFiles, setCleanupInterval, setCleanupOnStop, setCompactAcksAfterNoGC, setCompactAcksIgnoresStoreGrowth, setDeleteAllMessages, setDirectory, setDirectoryArchive, setEnableAckCompaction, setEnableIndexDiskSyncs, setEnableIndexPageCaching, setEnableIndexRecoveryFile, setEnableIndexWriteAsync, setEnableJournalDiskSyncs, setEnableSubscriptionStatistics, setFailIfDatabaseIsLocked, setFailoverProducersAuditDepth, setIgnoreMissingJournalfiles, setIndexCacheSize, setIndexDirectory, setIndexLFUEvictionFactor, setIndexWriteBatchSize, setJournalDiskSyncInterval, setJournalDiskSyncStrategy, setJournalMaxFileLength, setJournalMaxWriteBatchSize, setMaxFailoverProducersToTrack, setPreallocationScope, setPreallocationStrategy, setPurgeRecoveredXATransactionStrategy, setUseIndexLFRUEviction, store, store, toByteSequence, unloadMethods inherited from class org.apache.activemq.util.ServiceSupport
addServiceListener, dispose, isStarted, isStopped, isStopping, postStop, preStart, 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.store.PersistenceAdapter
allowIOResumption, getDirectory, setDirectoryMethods inherited from interface org.apache.activemq.Service
start, stop
-
Field Details
-
PROPERTY_CANCELED_TASK_MOD_METRIC
- See Also:
-
cancelledTaskModMetric
public static final int cancelledTaskModMetric -
PROPERTY_ASYNC_EXECUTOR_MAX_THREADS
- See Also:
-
queueExecutor
-
topicExecutor
-
-
Constructor Details
-
KahaDBStore
public KahaDBStore()
-
-
Method Details
-
toString
-
setBrokerName
- Specified by:
setBrokerNamein interfaceorg.apache.activemq.store.PersistenceAdapter
-
setUsageManager
public void setUsageManager(org.apache.activemq.usage.SystemUsage usageManager) - Specified by:
setUsageManagerin interfaceorg.apache.activemq.store.PersistenceAdapter
-
getUsageManager
public org.apache.activemq.usage.SystemUsage getUsageManager() -
isConcurrentStoreAndDispatchQueues
public boolean isConcurrentStoreAndDispatchQueues()- Returns:
- the concurrentStoreAndDispatch
-
setConcurrentStoreAndDispatchQueues
public void setConcurrentStoreAndDispatchQueues(boolean concurrentStoreAndDispatch) - Parameters:
concurrentStoreAndDispatch- the concurrentStoreAndDispatch to set
-
isConcurrentStoreAndDispatchTopics
public boolean isConcurrentStoreAndDispatchTopics()- Returns:
- the concurrentStoreAndDispatch
-
setConcurrentStoreAndDispatchTopics
public void setConcurrentStoreAndDispatchTopics(boolean concurrentStoreAndDispatch) - Parameters:
concurrentStoreAndDispatch- the concurrentStoreAndDispatch to set
-
getMaxAsyncJobs
public int getMaxAsyncJobs()- Returns:
- the maxAsyncJobs
-
setMaxAsyncJobs
public void setMaxAsyncJobs(int maxAsyncJobs) - Parameters:
maxAsyncJobs- the maxAsyncJobs to set
-
configureMetadata
protected void configureMetadata()- Specified by:
configureMetadatain classMessageDatabase
-
doStart
- Overrides:
doStartin classMessageDatabase- Throws:
Exception
-
doStop
- Overrides:
doStopin classMessageDatabase- Throws:
Exception
-
createTransactionStore
- Specified by:
createTransactionStorein interfaceorg.apache.activemq.store.PersistenceAdapter- Throws:
IOException
-
getForceRecoverIndex
public boolean getForceRecoverIndex() -
setForceRecoverIndex
public void setForceRecoverIndex(boolean forceRecoverIndex) -
forgetRecoveredAcks
public void forgetRecoveredAcks(ArrayList<org.apache.activemq.command.MessageAck> preparedAcks, boolean isRollback) throws IOException - Throws:
IOException
-
trackRecoveredAcks
public void trackRecoveredAcks(ArrayList<org.apache.activemq.command.MessageAck> preparedAcks) throws IOException - Throws:
IOException
-
createQueueMessageStore
public org.apache.activemq.store.MessageStore createQueueMessageStore(org.apache.activemq.command.ActiveMQQueue destination) throws IOException - Specified by:
createQueueMessageStorein interfaceorg.apache.activemq.store.PersistenceAdapter- Throws:
IOException
-
createTopicMessageStore
public org.apache.activemq.store.TopicMessageStore createTopicMessageStore(org.apache.activemq.command.ActiveMQTopic destination) throws IOException - Specified by:
createTopicMessageStorein interfaceorg.apache.activemq.store.PersistenceAdapter- Throws:
IOException
-
removeQueueMessageStore
public void removeQueueMessageStore(org.apache.activemq.command.ActiveMQQueue 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).- Specified by:
removeQueueMessageStorein interfaceorg.apache.activemq.store.PersistenceAdapter- Parameters:
destination- Destination to forget
-
removeTopicMessageStore
public void removeTopicMessageStore(org.apache.activemq.command.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).- Specified by:
removeTopicMessageStorein interfaceorg.apache.activemq.store.PersistenceAdapter- Parameters:
destination- Destination to forget
-
deleteAllMessages
- Specified by:
deleteAllMessagesin interfaceorg.apache.activemq.store.PersistenceAdapter- Throws:
IOException
-
getDestinations
- Specified by:
getDestinationsin interfaceorg.apache.activemq.store.PersistenceAdapter
-
getLastMessageBrokerSequenceId
public long getLastMessageBrokerSequenceId()- Specified by:
getLastMessageBrokerSequenceIdin interfaceorg.apache.activemq.store.PersistenceAdapter
-
getLastProducerSequenceId
public long getLastProducerSequenceId(org.apache.activemq.command.ProducerId id) - Specified by:
getLastProducerSequenceIdin interfaceorg.apache.activemq.store.PersistenceAdapter
-
size
public long size()- Specified by:
sizein interfaceorg.apache.activemq.store.PersistenceAdapter
-
beginTransaction
public void beginTransaction(org.apache.activemq.broker.ConnectionContext context) throws IOException - Specified by:
beginTransactionin interfaceorg.apache.activemq.store.PersistenceAdapter- Throws:
IOException
-
commitTransaction
public void commitTransaction(org.apache.activemq.broker.ConnectionContext context) throws IOException - Specified by:
commitTransactionin interfaceorg.apache.activemq.store.PersistenceAdapter- Throws:
IOException
-
rollbackTransaction
public void rollbackTransaction(org.apache.activemq.broker.ConnectionContext context) throws IOException - Specified by:
rollbackTransactionin interfaceorg.apache.activemq.store.PersistenceAdapter- Throws:
IOException
-
checkpoint
- Specified by:
checkpointin interfaceorg.apache.activemq.store.PersistenceAdapter- Throws:
IOException
-
getTransactionIdTransformer
public org.apache.activemq.store.TransactionIdTransformer getTransactionIdTransformer() -
setTransactionIdTransformer
public void setTransactionIdTransformer(org.apache.activemq.store.TransactionIdTransformer transactionIdTransformer) -
createJobSchedulerStore
public org.apache.activemq.broker.scheduler.JobSchedulerStore createJobSchedulerStore() throws UnsupportedOperationException- Specified by:
createJobSchedulerStorein interfaceorg.apache.activemq.store.PersistenceAdapter- Throws:
UnsupportedOperationException
-
isPersistNoLocal
public boolean isPersistNoLocal()- Specified by:
isPersistNoLocalin interfaceorg.apache.activemq.store.NoLocalSubscriptionAware
-