|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.activemq.store.memory.MemoryMessageStore
public class MemoryMessageStore
An implementation of MessageStore which uses a
| Field Summary | |
|---|---|
protected ActiveMQDestination |
destination
|
protected java.util.Map |
messageTable
|
| Constructor Summary | |
|---|---|
MemoryMessageStore(ActiveMQDestination destination)
|
|
MemoryMessageStore(ActiveMQDestination destination,
java.util.Map messageTable)
|
|
| Method Summary | |
|---|---|
void |
addMessage(ConnectionContext context,
Message message)
Adds a message to the message store |
void |
addMessageReference(ConnectionContext context,
MessageId messageId,
long expirationTime,
java.lang.String messageRef)
Adds a message reference to the message store |
void |
delete()
|
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. |
java.lang.String |
getMessageReference(MessageId identity)
Looks up a message using either the String messageID or the messageNumber. |
void |
recover(MessageRecoveryListener listener)
Recover any messages to be delivered. |
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 |
setUsageManager(UsageManager usageManager)
|
void |
start()
|
void |
stop()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final ActiveMQDestination destination
protected final java.util.Map messageTable
| Constructor Detail |
|---|
public MemoryMessageStore(ActiveMQDestination destination)
public MemoryMessageStore(ActiveMQDestination destination,
java.util.Map messageTable)
| Method Detail |
|---|
public void addMessage(ConnectionContext context,
Message message)
throws java.io.IOException
MessageStore
addMessage in interface MessageStorecontext - TODO
java.io.IOException
public void addMessageReference(ConnectionContext context,
MessageId messageId,
long expirationTime,
java.lang.String messageRef)
throws java.io.IOException
MessageStore
addMessageReference in interface MessageStorecontext - TODOmessageId - TODOexpirationTime - TODO
java.io.IOException
public Message getMessage(MessageId identity)
throws java.io.IOException
MessageStore
getMessage in interface MessageStoreidentity - which contains either the messageID or the messageNumber
java.io.IOException
public java.lang.String getMessageReference(MessageId identity)
throws java.io.IOException
MessageStore
getMessageReference in interface MessageStoreidentity - which contains either the messageID or the messageNumber
java.io.IOException
public void removeMessage(ConnectionContext context,
MessageAck ack)
throws java.io.IOException
MessageStore
removeMessage in interface MessageStorecontext - TODOack - 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 removeMessage(MessageId msgId)
throws java.io.IOException
java.io.IOException
public void recover(MessageRecoveryListener listener)
throws java.lang.Exception
MessageStore
recover in interface MessageStorejava.lang.Exceptionpublic void start()
start in interface Servicepublic void stop()
stop in interface Service
public void removeAllMessages(ConnectionContext context)
throws java.io.IOException
MessageStore
removeAllMessages in interface MessageStorecontext - TODO
java.io.IOExceptionpublic ActiveMQDestination getDestination()
MessageStore
getDestination in interface MessageStorepublic void delete()
public void setUsageManager(UsageManager usageManager)
setUsageManager in interface MessageStoreusageManager - The UsageManager that is controlling the destination's memory usage.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||