public class KahaDBStore.KahaDBMessageStore extends AbstractMessageStore
| Modifier and Type | Field and Description |
|---|---|
protected Map<org.apache.activemq.store.kahadb.KahaDBStore.AsyncJobKey,KahaDBStore.StoreTask> |
asyncTaskMap |
protected org.apache.activemq.store.kahadb.data.KahaDestination |
dest |
destination, FUTURE, indexListener, prioritizedMessages| Constructor and Description |
|---|
KahaDBStore.KahaDBMessageStore(ActiveMQDestination destination) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
acquireLocalAsyncLock() |
void |
addMessage(ConnectionContext context,
Message message)
Adds a message to the message store
|
ListenableFuture<Object> |
asyncAddQueueMessage(ConnectionContext context,
Message message)
Adds a message to the message store
|
ActiveMQDestination |
getDestination()
The destination that the message store is holding messages for.
|
Message |
getMessage(MessageId identity)
Looks up a message using either the String messageID or the
messageNumber.
|
int |
getMessageCount() |
boolean |
isEmpty()
flag to indicate if the store is empty
|
protected void |
lockAsyncJobQueue() |
void |
recover(MessageRecoveryListener listener)
Recover any messages to be delivered.
|
void |
recoverNextMessages(int maxReturned,
MessageRecoveryListener listener) |
protected int |
recoverRolledBackAcks(org.apache.activemq.store.kahadb.MessageDatabase.StoredDestination sd,
Transaction tx,
int maxReturned,
MessageRecoveryListener listener) |
protected void |
releaseLocalAsyncLock() |
void |
removeAllMessages(ConnectionContext context)
Removes all the messages from the message store.
|
void |
removeAsyncMessage(ConnectionContext context,
MessageAck ack) |
void |
removeMessage(ConnectionContext context,
MessageAck ack)
Removes a message from the message store.
|
void |
resetBatching()
A hint to the Store to reset any batching state for the Destination
|
void |
setBatch(MessageId identity)
allow caching cursors to set the current batch offset when cache is exhausted
|
void |
setMemoryUsage(MemoryUsage memoryUsage) |
void |
start() |
void |
stop() |
String |
toString() |
protected void |
unlockAsyncJobQueue() |
void |
updateMessage(Message message) |
addMessage, asyncAddQueueMessage, asyncAddTopicMessage, asyncAddTopicMessage, dispose, getIndexListener, isPrioritizedMessages, registerIndexListener, setPrioritizedMessagesprotected final Map<org.apache.activemq.store.kahadb.KahaDBStore.AsyncJobKey,KahaDBStore.StoreTask> asyncTaskMap
protected org.apache.activemq.store.kahadb.data.KahaDestination dest
public KahaDBStore.KahaDBMessageStore(ActiveMQDestination destination)
public ActiveMQDestination getDestination()
MessageStoregetDestination in interface MessageStoregetDestination in class AbstractMessageStorepublic ListenableFuture<Object> asyncAddQueueMessage(ConnectionContext context, Message message) throws IOException
MessageStoreasyncAddQueueMessage in interface MessageStoreasyncAddQueueMessage in class AbstractMessageStorecontext - contextIOExceptionpublic void removeAsyncMessage(ConnectionContext context, MessageAck ack) throws IOException
removeAsyncMessage in interface MessageStoreremoveAsyncMessage in class AbstractMessageStoreIOExceptionpublic void addMessage(ConnectionContext context, Message message) throws IOException
MessageStorecontext - contextIOExceptionpublic void updateMessage(Message message) throws IOException
updateMessage in interface MessageStoreupdateMessage in class AbstractMessageStoreIOExceptionpublic void removeMessage(ConnectionContext context, MessageAck ack) throws IOException
MessageStoreack - the ack request that cause the message to be removed. It
conatins the identity which contains the messageID of the
message that needs to be removed.IOExceptionpublic void removeAllMessages(ConnectionContext context) throws IOException
MessageStoreIOExceptionpublic Message getMessage(MessageId identity) throws IOException
MessageStoreidentity - which contains either the messageID or the messageNumberIOExceptionpublic int getMessageCount() throws IOException
IOExceptionpublic boolean isEmpty() throws IOException
AbstractMessageStoreisEmpty in interface MessageStoreisEmpty in class AbstractMessageStoreIOExceptionpublic void recover(MessageRecoveryListener listener) throws Exception
MessageStoreExceptionpublic void recoverNextMessages(int maxReturned, MessageRecoveryListener listener) throws Exception
Exceptionprotected int recoverRolledBackAcks(org.apache.activemq.store.kahadb.MessageDatabase.StoredDestination sd, Transaction tx, int maxReturned, MessageRecoveryListener listener) throws Exception
Exceptionpublic void resetBatching()
MessageStorepublic void setBatch(MessageId identity) throws IOException
MessageStoresetBatch in interface MessageStoresetBatch in class AbstractMessageStoreIOExceptionpublic void setMemoryUsage(MemoryUsage memoryUsage)
setMemoryUsage in interface MessageStoresetMemoryUsage in class AbstractMessageStorememoryUsage - The SystemUsage that is controlling the
destination's memory usage.public void start() throws Exception
start in interface Servicestart in class AbstractMessageStoreExceptionpublic void stop() throws Exception
stop in interface Servicestop in class AbstractMessageStoreExceptionprotected void lockAsyncJobQueue()
protected void unlockAsyncJobQueue()
protected void acquireLocalAsyncLock()
protected void releaseLocalAsyncLock()
Copyright © 2005–2015 FuseSource, Corp.. All rights reserved.