public class KahaDBStore.KahaDBMessageStore extends AbstractMessageStore
Modifier and Type | Field and Description |
---|---|
protected java.util.Map<org.apache.activemq.store.kahadb.KahaDBStore.AsyncJobKey,KahaDBStore.StoreTask> |
asyncTaskMap |
protected org.apache.activemq.store.kahadb.data.KahaDestination |
dest |
destination, FUTURE, 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
|
java.util.concurrent.Future<java.lang.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 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 memoeyUSage) |
void |
start() |
void |
stop() |
protected void |
unlockAsyncJobQueue() |
addMessage, asyncAddQueueMessage, asyncAddTopicMessage, asyncAddTopicMessage, dispose, isPrioritizedMessages, setPrioritizedMessages
protected final java.util.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()
MessageStore
getDestination
in interface MessageStore
getDestination
in class AbstractMessageStore
public java.util.concurrent.Future<java.lang.Object> asyncAddQueueMessage(ConnectionContext context, Message message) throws java.io.IOException
MessageStore
asyncAddQueueMessage
in interface MessageStore
asyncAddQueueMessage
in class AbstractMessageStore
context
- contextjava.io.IOException
public void removeAsyncMessage(ConnectionContext context, MessageAck ack) throws java.io.IOException
removeAsyncMessage
in interface MessageStore
removeAsyncMessage
in class AbstractMessageStore
java.io.IOException
public void addMessage(ConnectionContext context, Message message) throws java.io.IOException
MessageStore
context
- contextjava.io.IOException
public void removeMessage(ConnectionContext context, MessageAck ack) throws java.io.IOException
MessageStore
ack
- 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.java.io.IOException
public void removeAllMessages(ConnectionContext context) throws java.io.IOException
MessageStore
java.io.IOException
public Message getMessage(MessageId identity) throws java.io.IOException
MessageStore
identity
- which contains either the messageID or the messageNumberjava.io.IOException
public int getMessageCount() throws java.io.IOException
java.io.IOException
public boolean isEmpty() throws java.io.IOException
AbstractMessageStore
isEmpty
in interface MessageStore
isEmpty
in class AbstractMessageStore
java.io.IOException
public void recover(MessageRecoveryListener listener) throws java.lang.Exception
MessageStore
java.lang.Exception
public void recoverNextMessages(int maxReturned, MessageRecoveryListener listener) throws java.lang.Exception
java.lang.Exception
public void resetBatching()
MessageStore
public void setBatch(MessageId identity) throws java.io.IOException
MessageStore
setBatch
in interface MessageStore
setBatch
in class AbstractMessageStore
java.io.IOException
public void setMemoryUsage(MemoryUsage memoeyUSage)
setMemoryUsage
in interface MessageStore
setMemoryUsage
in class AbstractMessageStore
memoeyUSage
- The SystemUsage that is controlling the
destination's memory usage.public void start() throws java.lang.Exception
start
in interface Service
start
in class AbstractMessageStore
java.lang.Exception
public void stop() throws java.lang.Exception
stop
in interface Service
stop
in class AbstractMessageStore
java.lang.Exception
protected void lockAsyncJobQueue()
protected void unlockAsyncJobQueue()
protected void acquireLocalAsyncLock()
protected void releaseLocalAsyncLock()
Copyright © 2005-2017. All Rights Reserved.