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 java.util.List<java.util.Map<org.apache.activemq.store.kahadb.KahaDBStore.AsyncJobKey,KahaDBStore.StoreTask>> |
asyncQueueMaps |
protected java.util.List<java.util.Map<org.apache.activemq.store.kahadb.KahaDBStore.AsyncJobKey,KahaDBStore.StoreTask>> |
asyncTopicMaps |
static int |
cancelledTaskModMetric |
static java.lang.String |
PROPERTY_ASYNC_EXECUTOR_MAX_THREADS |
static java.lang.String |
PROPERTY_CANCELED_TASK_MOD_METRIC |
protected java.util.concurrent.ExecutorService |
queueExecutor |
protected java.util.concurrent.ExecutorService |
topicExecutor |
ackedAndPrepared, archiveDataLogs, brokerService, checkpointThread, DEFAULT_DIRECTORY, deleteAllMessages, directory, directoryArchive, enableJournalDiskSyncs, failIfDatabaseIsLocked, forceRecoverIndex, indexLock, journal, LOG_SLOW_ACCESS_TIME, metadata, metadataMarshaller, opened, pageFile, preparedTransactions, PROPERTY_LOG_SLOW_ACCESS_TIME, storeSize, UNMATCHED| Constructor and Description |
|---|
KahaDBStore() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addQueueTask(KahaDBStore.KahaDBMessageStore store,
org.apache.activemq.store.kahadb.KahaDBStore.StoreQueueTask task) |
protected void |
addTopicTask(org.apache.activemq.store.kahadb.KahaDBStore.KahaDBTopicMessageStore store,
org.apache.activemq.store.kahadb.KahaDBStore.StoreTopicTask task) |
void |
beginTransaction(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.
|
void |
checkpoint(boolean sync)
checkpoint any
|
void |
commitTransaction(ConnectionContext context)
Commit a persistence transaction
|
MessageStore |
createQueueMessageStore(ActiveMQQueue destination)
Factory method to create a new queue message store with the given destination name
|
TopicMessageStore |
createTopicMessageStore(ActiveMQTopic destination)
Factory method to create a new topic message store with the given destination name
|
TransactionStore |
createTransactionStore()
Factory method to create a new persistent prepared transaction store for XA recovery
|
void |
deleteAllMessages()
Delete's all the messages in the persistent store.
|
void |
doStart() |
void |
doStop(ServiceStopper stopper) |
java.util.Set<ActiveMQDestination> |
getDestinations()
Returns a set of all the
ActiveMQDestination
objects that the persistence store is aware exist. |
boolean |
getForceRecoverIndex() |
long |
getLastMessageBrokerSequenceId() |
long |
getLastProducerSequenceId(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 occurs
|
int |
getMaxAsyncJobs() |
TransactionIdTransformer |
getTransactionIdTransformer() |
SystemUsage |
getUsageManager() |
boolean |
isConcurrentStoreAndDispatchQueues() |
boolean |
isConcurrentStoreAndDispatchTopics() |
boolean |
isConcurrentStoreAndDispatchTransactions() |
void |
removeQueueMessageStore(ActiveMQQueue destination)
Cleanup method to remove any state associated with the given destination.
|
protected org.apache.activemq.store.kahadb.KahaDBStore.StoreQueueTask |
removeQueueTask(KahaDBStore.KahaDBMessageStore store,
MessageId id) |
void |
removeTopicMessageStore(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).
|
protected org.apache.activemq.store.kahadb.KahaDBStore.StoreTopicTask |
removeTopicTask(org.apache.activemq.store.kahadb.KahaDBStore.KahaDBTopicMessageStore store,
MessageId id) |
void |
rollbackTransaction(ConnectionContext context)
Rollback a persistence transaction
|
void |
setBrokerName(java.lang.String brokerName)
Set the name of the broker using the adapter
|
void |
setConcurrentStoreAndDispatchQueues(boolean concurrentStoreAndDispatch) |
void |
setConcurrentStoreAndDispatchTopics(boolean concurrentStoreAndDispatch) |
void |
setForceRecoverIndex(boolean forceRecoverIndex) |
void |
setMaxAsyncJobs(int maxAsyncJobs) |
void |
setTransactionIdTransformer(TransactionIdTransformer transactionIdTransformer) |
void |
setUsageManager(SystemUsage usageManager) |
long |
size()
A hint to return the size of the store on disk
|
java.lang.String |
toString() |
checkpoint, checkpointCleanup, close, forgetRecoveredAcks, getCheckpointInterval, getCleanupInterval, getDatabaseLockedWaitDelay, getDirectory, getDirectoryArchive, getExistingStoredDestination, getFailoverProducersAuditDepth, getFirstInProgressTxLocation, getIndexCacheSize, getIndexLFUEvictionFactor, getIndexWriteBatchSize, getJournal, getJournalFilesBeingReplicated, getJournalMaxFileLength, getJournalMaxWriteBatchSize, getLastAck, getLastUpdatePosition, getLockFile, getMaxFailoverProducersToTrack, getPageFile, getStoredDestination, getStoredMessageCount, 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, setDatabaseLockedWaitDelay, 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, unloadaddServiceListener, dispose, isStarted, isStopped, isStopping, removeServiceListener, start, stopclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetDirectory, setDirectorypublic static final java.lang.String PROPERTY_CANCELED_TASK_MOD_METRIC
public static final int cancelledTaskModMetric
public static final java.lang.String PROPERTY_ASYNC_EXECUTOR_MAX_THREADS
protected java.util.concurrent.ExecutorService queueExecutor
protected java.util.concurrent.ExecutorService topicExecutor
protected final java.util.List<java.util.Map<org.apache.activemq.store.kahadb.KahaDBStore.AsyncJobKey,KahaDBStore.StoreTask>> asyncQueueMaps
protected final java.util.List<java.util.Map<org.apache.activemq.store.kahadb.KahaDBStore.AsyncJobKey,KahaDBStore.StoreTask>> asyncTopicMaps
public KahaDBStore()
public java.lang.String toString()
toString in class java.lang.Objectpublic void setBrokerName(java.lang.String brokerName)
PersistenceAdaptersetBrokerName in interface PersistenceAdapterpublic void setUsageManager(SystemUsage usageManager)
setUsageManager in interface PersistenceAdapterusageManager - The UsageManager that is controlling the broker's memory usage.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 java.lang.Exception
doStart in class MessageDatabasejava.lang.Exceptionpublic void doStop(ServiceStopper stopper) throws java.lang.Exception
doStop in class MessageDatabasejava.lang.Exceptionprotected org.apache.activemq.store.kahadb.KahaDBStore.StoreQueueTask removeQueueTask(KahaDBStore.KahaDBMessageStore store, MessageId id)
protected void addQueueTask(KahaDBStore.KahaDBMessageStore store, org.apache.activemq.store.kahadb.KahaDBStore.StoreQueueTask task) throws java.io.IOException
java.io.IOExceptionprotected org.apache.activemq.store.kahadb.KahaDBStore.StoreTopicTask removeTopicTask(org.apache.activemq.store.kahadb.KahaDBStore.KahaDBTopicMessageStore store, MessageId id)
protected void addTopicTask(org.apache.activemq.store.kahadb.KahaDBStore.KahaDBTopicMessageStore store, org.apache.activemq.store.kahadb.KahaDBStore.StoreTopicTask task) throws java.io.IOException
java.io.IOExceptionpublic TransactionStore createTransactionStore() throws java.io.IOException
PersistenceAdaptercreateTransactionStore in interface PersistenceAdapterjava.io.IOExceptionpublic boolean getForceRecoverIndex()
public void setForceRecoverIndex(boolean forceRecoverIndex)
public MessageStore createQueueMessageStore(ActiveMQQueue destination) throws java.io.IOException
PersistenceAdaptercreateQueueMessageStore in interface PersistenceAdapterjava.io.IOExceptionpublic TopicMessageStore createTopicMessageStore(ActiveMQTopic destination) throws java.io.IOException
PersistenceAdaptercreateTopicMessageStore in interface PersistenceAdapterjava.io.IOExceptionpublic void removeQueueMessageStore(ActiveMQQueue destination)
removeQueueMessageStore in interface PersistenceAdapterdestination - Destination to forgetpublic void removeTopicMessageStore(ActiveMQTopic destination)
removeTopicMessageStore in interface PersistenceAdapterdestination - Destination to forgetpublic void deleteAllMessages() throws java.io.IOException
PersistenceAdapterdeleteAllMessages in interface PersistenceAdapterjava.io.IOExceptionpublic java.util.Set<ActiveMQDestination> getDestinations()
PersistenceAdapterActiveMQDestination
objects that the persistence store is aware exist.getDestinations in interface PersistenceAdapterpublic long getLastMessageBrokerSequenceId() throws java.io.IOException
getLastMessageBrokerSequenceId in interface PersistenceAdapterjava.io.IOExceptionpublic long getLastProducerSequenceId(ProducerId id)
PersistenceAdaptergetLastProducerSequenceId in interface PersistenceAdapterid - the producerId to find a sequenceId forpublic long size()
PersistenceAdaptersize in interface PersistenceAdapterpublic void beginTransaction(ConnectionContext context) throws java.io.IOException
PersistenceAdapterbeginTransaction in interface PersistenceAdapterjava.io.IOExceptionpublic void commitTransaction(ConnectionContext context) throws java.io.IOException
PersistenceAdaptercommitTransaction in interface PersistenceAdapterjava.io.IOExceptionPersistenceAdapter.beginTransaction(ConnectionContext context)public void rollbackTransaction(ConnectionContext context) throws java.io.IOException
PersistenceAdapterrollbackTransaction in interface PersistenceAdapterjava.io.IOExceptionPersistenceAdapter.beginTransaction(ConnectionContext context)public void checkpoint(boolean sync) throws java.io.IOException
PersistenceAdaptercheckpoint in interface PersistenceAdapterjava.io.IOExceptionpublic TransactionIdTransformer getTransactionIdTransformer()
public void setTransactionIdTransformer(TransactionIdTransformer transactionIdTransformer)
Copyright © 2005-2012. All Rights Reserved.