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:
- BrokerServiceAware, org.apache.activemq.Service, PersistenceAdapter
public class KahaDBStore
- extends MessageDatabase
- implements PersistenceAdapter
| Fields inherited from class org.apache.activemq.store.kahadb.MessageDatabase |
ackedAndPrepared, archiveDataLogs, brokerService, checkpointThread, DEFAULT_DIRECTORY, deleteAllMessages, directory, directoryArchive, enableJournalDiskSyncs, failIfDatabaseIsLocked, forceRecoverIndex, indexLock, journal, journalSize, LOG_SLOW_ACCESS_TIME, metadata, metadataMarshaller, opened, pageFile, preparedTransactions, PROPERTY_LOG_SLOW_ACCESS_TIME, UNMATCHED |
| Methods inherited from class org.apache.activemq.store.kahadb.MessageDatabase |
checkpointCleanup, close, forgetRecoveredAcks, getCheckpointInterval, getCleanupInterval, getDirectory, getDirectoryArchive, getExistingStoredDestination, getFailoverProducersAuditDepth, getIndexCacheSize, getIndexLFUEvictionFactor, getIndexWriteBatchSize, getInProgressTxLocationRange, getJournal, getJournalFilesBeingReplicated, getJournalMaxFileLength, getJournalMaxWriteBatchSize, getLastAck, getLastUpdatePosition, getMaxFailoverProducersToTrack, getPageFile, getStoredDestination, getStoredMessageCount, getTransactions, incrementalRecover, isArchiveCorruptedIndex, isArchiveDataLogs, isCheckForCorruptJournalFiles, isChecksumJournalFiles, isDeleteAllMessages, isEnableIndexDiskSyncs, isEnableIndexPageCaching, isEnableIndexRecoveryFile, isEnableJournalDiskSyncs, isFailIfDatabaseIsLocked, isIgnoreMissingJournalfiles, isRewriteOnRedelivery, isUseIndexLFRUEviction, load, load, open, process, process, process, process, process, process, process, processLocation, recoverIndex, setArchiveCorruptedIndex, setArchiveDataLogs, setBrokerService, setCheckForCorruptJournalFiles, setCheckpointInterval, setChecksumJournalFiles, setCleanupInterval, setDeleteAllMessages, setDirectory, setDirectoryArchive, setEnableIndexDiskSyncs, setEnableIndexPageCaching, setEnableIndexRecoveryFile, setEnableIndexWriteAsync, setEnableJournalDiskSyncs, setFailIfDatabaseIsLocked, setFailoverProducersAuditDepth, setIgnoreMissingJournalfiles, setIndexCacheSize, setIndexLFUEvictionFactor, setIndexWriteBatchSize, setJournalMaxFileLength, setJournalMaxWriteBatchSize, setMaxFailoverProducersToTrack, setRewriteOnRedelivery, setUseIndexLFRUEviction, store, store, store, store, toByteSequence, trackRecoveredAcks, unload |
| Methods inherited from interface org.apache.activemq.Service |
start, stop |
PROPERTY_CANCELED_TASK_MOD_METRIC
public static final String PROPERTY_CANCELED_TASK_MOD_METRIC
- See Also:
- Constant Field Values
cancelledTaskModMetric
public static final int cancelledTaskModMetric
PROPERTY_ASYNC_EXECUTOR_MAX_THREADS
public static final String PROPERTY_ASYNC_EXECUTOR_MAX_THREADS
- See Also:
- Constant Field Values
queueExecutor
protected ExecutorService queueExecutor
topicExecutor
protected ExecutorService topicExecutor
asyncQueueMaps
protected final List<Map<org.apache.activemq.store.kahadb.KahaDBStore.AsyncJobKey,KahaDBStore.StoreTask>> asyncQueueMaps
asyncTopicMaps
protected final List<Map<org.apache.activemq.store.kahadb.KahaDBStore.AsyncJobKey,KahaDBStore.StoreTask>> asyncTopicMaps
KahaDBStore
public KahaDBStore()
toString
public String toString()
- Overrides:
toString in class Object
setBrokerName
public void setBrokerName(String brokerName)
- Specified by:
setBrokerName in interface PersistenceAdapter
setUsageManager
public void setUsageManager(SystemUsage usageManager)
- Specified by:
setUsageManager in interface PersistenceAdapter
getUsageManager
public 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
isConcurrentStoreAndDispatchTransactions
public boolean isConcurrentStoreAndDispatchTransactions()
getMaxAsyncJobs
public int getMaxAsyncJobs()
- Returns:
- the maxAsyncJobs
setMaxAsyncJobs
public void setMaxAsyncJobs(int maxAsyncJobs)
- Parameters:
maxAsyncJobs - the maxAsyncJobs to set
doStart
public void doStart()
throws Exception
- Overrides:
doStart in class MessageDatabase
- Throws:
Exception
doStop
public void doStop(ServiceStopper stopper)
throws Exception
- Overrides:
doStop in class MessageDatabase
- Throws:
Exception
removeQueueTask
protected org.apache.activemq.store.kahadb.KahaDBStore.StoreQueueTask removeQueueTask(KahaDBStore.KahaDBMessageStore store,
org.apache.activemq.command.MessageId id)
addQueueTask
protected void addQueueTask(KahaDBStore.KahaDBMessageStore store,
org.apache.activemq.store.kahadb.KahaDBStore.StoreQueueTask task)
throws IOException
- Throws:
IOException
removeTopicTask
protected org.apache.activemq.store.kahadb.KahaDBStore.StoreTopicTask removeTopicTask(org.apache.activemq.store.kahadb.KahaDBStore.KahaDBTopicMessageStore store,
org.apache.activemq.command.MessageId id)
addTopicTask
protected void addTopicTask(org.apache.activemq.store.kahadb.KahaDBStore.KahaDBTopicMessageStore store,
org.apache.activemq.store.kahadb.KahaDBStore.StoreTopicTask task)
throws IOException
- Throws:
IOException
createTransactionStore
public TransactionStore createTransactionStore()
throws IOException
- Specified by:
createTransactionStore in interface PersistenceAdapter
- Throws:
IOException
getForceRecoverIndex
public boolean getForceRecoverIndex()
setForceRecoverIndex
public void setForceRecoverIndex(boolean forceRecoverIndex)
createQueueMessageStore
public MessageStore createQueueMessageStore(org.apache.activemq.command.ActiveMQQueue destination)
throws IOException
- Specified by:
createQueueMessageStore in interface PersistenceAdapter
- Throws:
IOException
createTopicMessageStore
public TopicMessageStore createTopicMessageStore(org.apache.activemq.command.ActiveMQTopic destination)
throws IOException
- Specified by:
createTopicMessageStore in interface 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:
removeQueueMessageStore in interface 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:
removeTopicMessageStore in interface PersistenceAdapter
- Parameters:
destination - Destination to forget
deleteAllMessages
public void deleteAllMessages()
throws IOException
- Specified by:
deleteAllMessages in interface PersistenceAdapter
- Throws:
IOException
getDestinations
public Set<org.apache.activemq.command.ActiveMQDestination> getDestinations()
- Specified by:
getDestinations in interface PersistenceAdapter
getLastMessageBrokerSequenceId
public long getLastMessageBrokerSequenceId()
throws IOException
- Specified by:
getLastMessageBrokerSequenceId in interface PersistenceAdapter
- Throws:
IOException
getLastProducerSequenceId
public long getLastProducerSequenceId(org.apache.activemq.command.ProducerId id)
- Specified by:
getLastProducerSequenceId in interface PersistenceAdapter
size
public long size()
- Specified by:
size in interface PersistenceAdapter
beginTransaction
public void beginTransaction(ConnectionContext context)
throws IOException
- Specified by:
beginTransaction in interface PersistenceAdapter
- Throws:
IOException
commitTransaction
public void commitTransaction(ConnectionContext context)
throws IOException
- Specified by:
commitTransaction in interface PersistenceAdapter
- Throws:
IOException
rollbackTransaction
public void rollbackTransaction(ConnectionContext context)
throws IOException
- Specified by:
rollbackTransaction in interface PersistenceAdapter
- Throws:
IOException
checkpoint
public void checkpoint(boolean sync)
throws IOException
- Specified by:
checkpoint in interface PersistenceAdapter
- Throws:
IOException
getTransactionIdTransformer
public TransactionIdTransformer getTransactionIdTransformer()
setTransactionIdTransformer
public void setTransactionIdTransformer(TransactionIdTransformer transactionIdTransformer)
Copyright © 2005-2013 The Apache Software Foundation. All Rights Reserved.