public class KahaDBStore extends MessageDatabase implements PersistenceAdapter
Modifier and Type | Class and Description |
---|---|
class |
KahaDBStore.KahaDBMessageStore |
static interface |
KahaDBStore.StoreTask |
class |
KahaDBStore.StoreTaskExecutor |
MessageDatabase.LastAckMarshaller, MessageDatabase.MessageKeysMarshaller, MessageDatabase.Metadata, MessageDatabase.StoredDestinationMarshaller
Modifier and Type | Field and Description |
---|---|
protected List<Map<org.apache.activemq.store.kahadb.KahaDBStore.AsyncJobKey,KahaDBStore.StoreTask>> |
asyncQueueMaps |
protected List<Map<org.apache.activemq.store.kahadb.KahaDBStore.AsyncJobKey,KahaDBStore.StoreTask>> |
asyncTopicMaps |
static int |
cancelledTaskModMetric |
static String |
PROPERTY_ASYNC_EXECUTOR_MAX_THREADS |
static String |
PROPERTY_CANCELED_TASK_MOD_METRIC |
protected ExecutorService |
queueExecutor |
protected ExecutorService |
topicExecutor |
archiveDataLogs, brokerService, DEFAULT_DIRECTORY, deleteAllMessages, directory, directoryArchive, failIfDatabaseIsLocked, forceRecoverIndex, indexDirectory, indexLock, journal, journalDiskSyncStrategy, journalSize, lastAsyncJournalUpdate, LOG_SLOW_ACCESS_TIME, metadata, metadataMarshaller, opened, pageFile, preparedTransactions, PROPERTY_LOG_SLOW_ACCESS_TIME, scheduler, storeCache, storedDestinations, UNMATCHED
Constructor and Description |
---|
KahaDBStore() |
allowIOResumption, checkpointCleanup, close, createJournal, getCheckpointInterval, getCleanupInterval, getCleanupOnStop, getCompactAcksAfterNoGC, getDirectory, getDirectoryArchive, getExistingStoredDestination, getFailoverProducersAuditDepth, getIndexCacheSize, getIndexDirectory, getIndexLFUEvictionFactor, getIndexWriteBatchSize, getInProgressTxLocationRange, getJournal, getJournalDiskSyncInterval, getJournalDiskSyncStrategy, getJournalDiskSyncStrategyEnum, getJournalFilesBeingReplicated, getJournalMaxFileLength, getJournalMaxWriteBatchSize, getLastAck, getLastUpdatePosition, getMaxFailoverProducersToTrack, getMetadata, getPageFile, getPreallocationScope, getPreallocationStrategy, getPreparedTransaction, getSequenceSet, getStoredDestination, getStoredMessageCount, getTransactions, incrementalRecover, isArchiveCorruptedIndex, isArchiveDataLogs, isCheckForCorruptJournalFiles, isChecksumJournalFiles, isCompactAcksIgnoresStoreGrowth, isDeleteAllMessages, isEnableAckCompaction, isEnableIndexDiskSyncs, isEnableIndexPageCaching, isEnableIndexRecoveryFile, isEnableJournalDiskSyncs, isFailIfDatabaseIsLocked, isIgnoreMissingJournalfiles, isUseIndexLFRUEviction, key, load, load, open, process, process, 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, setFailIfDatabaseIsLocked, setFailoverProducersAuditDepth, setIgnoreMissingJournalfiles, setIndexCacheSize, setIndexDirectory, setIndexLFUEvictionFactor, setIndexWriteBatchSize, setJournalDiskSyncInterval, setJournalDiskSyncStrategy, setJournalMaxFileLength, setJournalMaxWriteBatchSize, setMaxFailoverProducersToTrack, setPreallocationScope, setPreallocationStrategy, setUseIndexLFRUEviction, store, store, store, store, toByteSequence, unload
addServiceListener, dispose, isStarted, isStopped, isStopping, postStop, preStart, removeServiceListener, start, stop
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
allowIOResumption, getDirectory, setDirectory
public static final String PROPERTY_CANCELED_TASK_MOD_METRIC
public static final int cancelledTaskModMetric
public static final String PROPERTY_ASYNC_EXECUTOR_MAX_THREADS
protected ExecutorService queueExecutor
protected ExecutorService topicExecutor
protected final List<Map<org.apache.activemq.store.kahadb.KahaDBStore.AsyncJobKey,KahaDBStore.StoreTask>> asyncQueueMaps
protected final List<Map<org.apache.activemq.store.kahadb.KahaDBStore.AsyncJobKey,KahaDBStore.StoreTask>> asyncTopicMaps
public KahaDBStore()
public void setBrokerName(String brokerName)
setBrokerName
in interface PersistenceAdapter
public void setUsageManager(SystemUsage usageManager)
setUsageManager
in interface PersistenceAdapter
public SystemUsage getUsageManager()
public boolean isConcurrentStoreAndDispatchQueues()
public void setConcurrentStoreAndDispatchQueues(boolean concurrentStoreAndDispatch)
concurrentStoreAndDispatch
- the concurrentStoreAndDispatch to setpublic boolean isConcurrentStoreAndDispatchTopics()
public void setConcurrentStoreAndDispatchTopics(boolean concurrentStoreAndDispatch)
concurrentStoreAndDispatch
- the concurrentStoreAndDispatch to setpublic boolean isConcurrentStoreAndDispatchTransactions()
public int getMaxAsyncJobs()
public void setMaxAsyncJobs(int maxAsyncJobs)
maxAsyncJobs
- the maxAsyncJobs to setpublic void doStart() throws Exception
doStart
in class MessageDatabase
Exception
public void doStop(ServiceStopper stopper) throws Exception
doStop
in class MessageDatabase
Exception
protected org.apache.activemq.store.kahadb.KahaDBStore.StoreQueueTask removeQueueTask(KahaDBStore.KahaDBMessageStore store, org.apache.activemq.command.MessageId id)
protected void addQueueTask(KahaDBStore.KahaDBMessageStore store, org.apache.activemq.store.kahadb.KahaDBStore.StoreQueueTask task) throws IOException
IOException
protected org.apache.activemq.store.kahadb.KahaDBStore.StoreTopicTask removeTopicTask(org.apache.activemq.store.kahadb.KahaDBStore.KahaDBTopicMessageStore store, org.apache.activemq.command.MessageId id)
protected void addTopicTask(org.apache.activemq.store.kahadb.KahaDBStore.KahaDBTopicMessageStore store, org.apache.activemq.store.kahadb.KahaDBStore.StoreTopicTask task) throws IOException
IOException
public TransactionStore createTransactionStore() throws IOException
createTransactionStore
in interface PersistenceAdapter
IOException
public boolean getForceRecoverIndex()
public void setForceRecoverIndex(boolean forceRecoverIndex)
public void forgetRecoveredAcks(ArrayList<org.apache.activemq.command.MessageAck> preparedAcks, boolean isRollback) throws IOException
IOException
public void trackRecoveredAcks(ArrayList<org.apache.activemq.command.MessageAck> preparedAcks) throws IOException
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 void removeQueueMessageStore(org.apache.activemq.command.ActiveMQQueue destination)
removeQueueMessageStore
in interface PersistenceAdapter
destination
- Destination to forgetpublic void removeTopicMessageStore(org.apache.activemq.command.ActiveMQTopic destination)
removeTopicMessageStore
in interface PersistenceAdapter
destination
- Destination to forgetpublic 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)
getLastProducerSequenceId
in interface PersistenceAdapter
public long size()
size
in interface PersistenceAdapter
public void beginTransaction(ConnectionContext context) throws IOException
beginTransaction
in interface PersistenceAdapter
IOException
public void commitTransaction(ConnectionContext context) throws IOException
commitTransaction
in interface PersistenceAdapter
IOException
public void rollbackTransaction(ConnectionContext context) throws IOException
rollbackTransaction
in interface PersistenceAdapter
IOException
public void checkpoint(boolean sync) throws IOException
checkpoint
in interface PersistenceAdapter
IOException
public TransactionIdTransformer getTransactionIdTransformer()
public void setTransactionIdTransformer(TransactionIdTransformer transactionIdTransformer)
public JobSchedulerStore createJobSchedulerStore() throws IOException, UnsupportedOperationException
createJobSchedulerStore
in interface PersistenceAdapter
IOException
UnsupportedOperationException
Copyright © 2005–2021 FuseSource, Corp.. All rights reserved.