Package org.apache.activemq.store.kahadb
Class KahaDBStore.KahaDBMessageStore
- java.lang.Object
-
- org.apache.activemq.store.AbstractMessageStore
-
- org.apache.activemq.store.kahadb.KahaDBStore.KahaDBMessageStore
-
- All Implemented Interfaces:
org.apache.activemq.Service,MessageStore
- Enclosing class:
- KahaDBStore
public class KahaDBStore.KahaDBMessageStore extends AbstractMessageStore
-
-
Field Summary
Fields Modifier and Type Field Description protected HashMap<String,Set<String>>ackedAndPreparedMapprotected Map<org.apache.activemq.store.kahadb.KahaDBStore.AsyncJobKey,KahaDBStore.StoreTask>asyncTaskMapprotected KahaDestinationdestprotected HashMap<String,Set<String>>rolledBackAcksMap-
Fields inherited from class org.apache.activemq.store.AbstractMessageStore
destination, FUTURE, indexListener, messageStoreStatistics, prioritizedMessages
-
-
Constructor Summary
Constructors Constructor Description KahaDBMessageStore(org.apache.activemq.command.ActiveMQDestination destination)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidacquireLocalAsyncLock()voidaddMessage(ConnectionContext context, org.apache.activemq.command.Message message)ListenableFuture<Object>asyncAddQueueMessage(ConnectionContext context, org.apache.activemq.command.Message message)voidforgetRecoveredAcks(ArrayList<org.apache.activemq.command.MessageAck> acks, boolean rollback)org.apache.activemq.command.ActiveMQDestinationgetDestination()org.apache.activemq.command.MessagegetMessage(org.apache.activemq.command.MessageId identity)booleanisEmpty()protected voidlockAsyncJobQueue()voidrecover(MessageRecoveryListener listener)protected voidrecoverMessageStoreStatistics()voidrecoverNextMessages(int maxReturned, MessageRecoveryListener listener)protected intrecoverRolledBackAcks(String recoveredTxStateMapKey, org.apache.activemq.store.kahadb.MessageDatabase.StoredDestination sd, Transaction tx, int maxReturned, MessageRecoveryListener listener)protected voidreleaseLocalAsyncLock()voidremoveAllMessages(ConnectionContext context)voidremoveAsyncMessage(ConnectionContext context, org.apache.activemq.command.MessageAck ack)voidremoveMessage(ConnectionContext context, org.apache.activemq.command.MessageAck ack)voidresetBatching()voidsetBatch(org.apache.activemq.command.MessageId identity)voidsetMemoryUsage(MemoryUsage memoryUsage)voidstart()voidstop()StringtoString()voidtrackRecoveredAcks(ArrayList<org.apache.activemq.command.MessageAck> acks)protected voidunlockAsyncJobQueue()voidupdateMessage(org.apache.activemq.command.Message message)-
Methods inherited from class org.apache.activemq.store.AbstractMessageStore
addMessage, asyncAddQueueMessage, asyncAddTopicMessage, asyncAddTopicMessage, dispose, getIndexListener, getMessageCount, getMessageSize, getMessageStoreStatistics, isPrioritizedMessages, registerIndexListener, setPrioritizedMessages
-
-
-
-
Field Detail
-
asyncTaskMap
protected final Map<org.apache.activemq.store.kahadb.KahaDBStore.AsyncJobKey,KahaDBStore.StoreTask> asyncTaskMap
-
dest
protected KahaDestination dest
-
-
Method Detail
-
getDestination
public org.apache.activemq.command.ActiveMQDestination getDestination()
- Specified by:
getDestinationin interfaceMessageStore- Overrides:
getDestinationin classAbstractMessageStore
-
trackRecoveredAcks
public void trackRecoveredAcks(ArrayList<org.apache.activemq.command.MessageAck> acks)
-
forgetRecoveredAcks
public void forgetRecoveredAcks(ArrayList<org.apache.activemq.command.MessageAck> acks, boolean rollback) throws IOException
- Throws:
IOException
-
asyncAddQueueMessage
public ListenableFuture<Object> asyncAddQueueMessage(ConnectionContext context, org.apache.activemq.command.Message message) throws IOException
- Specified by:
asyncAddQueueMessagein interfaceMessageStore- Overrides:
asyncAddQueueMessagein classAbstractMessageStore- Throws:
IOException
-
removeAsyncMessage
public void removeAsyncMessage(ConnectionContext context, org.apache.activemq.command.MessageAck ack) throws IOException
- Specified by:
removeAsyncMessagein interfaceMessageStore- Overrides:
removeAsyncMessagein classAbstractMessageStore- Throws:
IOException
-
addMessage
public void addMessage(ConnectionContext context, org.apache.activemq.command.Message message) throws IOException
- Throws:
IOException
-
updateMessage
public void updateMessage(org.apache.activemq.command.Message message) throws IOException- Specified by:
updateMessagein interfaceMessageStore- Overrides:
updateMessagein classAbstractMessageStore- Throws:
IOException
-
removeMessage
public void removeMessage(ConnectionContext context, org.apache.activemq.command.MessageAck ack) throws IOException
- Throws:
IOException
-
removeAllMessages
public void removeAllMessages(ConnectionContext context) throws IOException
- Throws:
IOException
-
getMessage
public org.apache.activemq.command.Message getMessage(org.apache.activemq.command.MessageId identity) throws IOException- Throws:
IOException
-
isEmpty
public boolean isEmpty() throws IOException- Specified by:
isEmptyin interfaceMessageStore- Overrides:
isEmptyin classAbstractMessageStore- Throws:
IOException
-
recover
public void recover(MessageRecoveryListener listener) throws Exception
- Throws:
Exception
-
recoverNextMessages
public void recoverNextMessages(int maxReturned, MessageRecoveryListener listener) throws Exception- Throws:
Exception
-
recoverRolledBackAcks
protected int recoverRolledBackAcks(String recoveredTxStateMapKey, org.apache.activemq.store.kahadb.MessageDatabase.StoredDestination sd, Transaction tx, int maxReturned, MessageRecoveryListener listener) throws Exception
- Throws:
Exception
-
resetBatching
public void resetBatching()
-
setBatch
public void setBatch(org.apache.activemq.command.MessageId identity) throws IOException- Specified by:
setBatchin interfaceMessageStore- Overrides:
setBatchin classAbstractMessageStore- Throws:
IOException
-
setMemoryUsage
public void setMemoryUsage(MemoryUsage memoryUsage)
- Specified by:
setMemoryUsagein interfaceMessageStore- Overrides:
setMemoryUsagein classAbstractMessageStore
-
start
public void start() throws Exception- Specified by:
startin interfaceorg.apache.activemq.Service- Overrides:
startin classAbstractMessageStore- Throws:
Exception
-
stop
public void stop() throws Exception- Specified by:
stopin interfaceorg.apache.activemq.Service- Overrides:
stopin classAbstractMessageStore- Throws:
Exception
-
lockAsyncJobQueue
protected void lockAsyncJobQueue()
-
unlockAsyncJobQueue
protected void unlockAsyncJobQueue()
-
acquireLocalAsyncLock
protected void acquireLocalAsyncLock()
-
releaseLocalAsyncLock
protected void releaseLocalAsyncLock()
-
recoverMessageStoreStatistics
protected void recoverMessageStoreStatistics() throws IOException- Overrides:
recoverMessageStoreStatisticsin classAbstractMessageStore- Throws:
IOException
-
-