|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.activemq.store.AbstractMessageStore
org.apache.activemq.store.memory.MemoryMessageStore
public class MemoryMessageStore
An implementation of MessageStore
which
uses a
Field Summary | |
---|---|
protected MessageId |
lastBatchId
|
protected Map<MessageId,Message> |
messageTable
|
Fields inherited from class org.apache.activemq.store.AbstractMessageStore |
---|
destination |
Constructor Summary | |
---|---|
MemoryMessageStore(ActiveMQDestination destination)
|
|
MemoryMessageStore(ActiveMQDestination destination,
Map<MessageId,Message> messageTable)
|
Method Summary | |
---|---|
void |
addMessage(ConnectionContext context,
Message message)
Adds a message to the message store |
void |
delete()
|
Message |
getMessage(MessageId identity)
Looks up a message using either the String messageID or the messageNumber. |
int |
getMessageCount()
|
void |
recover(MessageRecoveryListener listener)
Recover any messages to be delivered. |
void |
recoverNextMessages(int maxReturned,
MessageRecoveryListener listener)
|
void |
removeAllMessages(ConnectionContext context)
Removes all the messages from the message store. |
void |
removeMessage(ConnectionContext context,
MessageAck ack)
Removes a message from the message store. |
void |
removeMessage(MessageId msgId)
|
void |
resetBatching()
A hint to the Store to reset any batching state for the Destination |
void |
setBatch(MessageId messageId)
allow caching cursors to set the current batch offset when cache is exhausted |
Methods inherited from class org.apache.activemq.store.AbstractMessageStore |
---|
dispose, getDestination, isEmpty, setMemoryUsage, start, stop |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final Map<MessageId,Message> messageTable
protected MessageId lastBatchId
Constructor Detail |
---|
public MemoryMessageStore(ActiveMQDestination destination)
public MemoryMessageStore(ActiveMQDestination destination, Map<MessageId,Message> messageTable)
Method Detail |
---|
public void addMessage(ConnectionContext context, Message message) throws IOException
MessageStore
context
- context
IOException
public Message getMessage(MessageId identity) throws IOException
MessageStore
identity
- which contains either the messageID or the messageNumber
IOException
public void removeMessage(ConnectionContext context, MessageAck ack) throws 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.
IOException
public void removeMessage(MessageId msgId) throws IOException
IOException
public void recover(MessageRecoveryListener listener) throws Exception
MessageStore
Exception
public void removeAllMessages(ConnectionContext context) throws IOException
MessageStore
IOException
public void delete()
public int getMessageCount()
public void recoverNextMessages(int maxReturned, MessageRecoveryListener listener) throws Exception
Exception
public void resetBatching()
MessageStore
public void setBatch(MessageId messageId)
MessageStore
setBatch
in interface MessageStore
setBatch
in class AbstractMessageStore
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |