|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.activemq.store.kahadaptor.KahaMessageStore
public class KahaMessageStore
An implementation of MessageStore
which uses a JPS Container
Field Summary | |
---|---|
protected ActiveMQDestination |
destination
|
protected MapContainer |
messageContainer
|
Constructor Summary | |
---|---|
KahaMessageStore(MapContainer container,
ActiveMQDestination destination)
|
Method Summary | |
---|---|
void |
addMessage(ConnectionContext context,
Message message)
Adds a message to the message store |
void |
addMessageReference(ConnectionContext context,
MessageId messageId,
long expirationTime,
String messageRef)
Adds a message reference to the message store |
void |
delete()
|
ActiveMQDestination |
getDestination()
The destination that the message store is holding messages for. |
Object |
getId()
|
Message |
getMessage(MessageId identity)
Looks up a message using either the String messageID or the messageNumber. |
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 MapContainer messageContainer
Constructor Detail |
---|
public KahaMessageStore(MapContainer container, ActiveMQDestination destination) throws IOException
IOException
Method Detail |
---|
public Object getId()
public void addMessage(ConnectionContext context, Message message) throws IOException
MessageStore
addMessage
in interface MessageStore
context
- TODO
IOException
public void addMessageReference(ConnectionContext context, MessageId messageId, long expirationTime, String messageRef) throws IOException
MessageStore
addMessageReference
in interface MessageStore
context
- TODOmessageId
- TODOexpirationTime
- TODO
IOException
public Message getMessage(MessageId identity) throws IOException
MessageStore
getMessage
in interface MessageStore
identity
- which contains either the messageID or the messageNumber
IOException
public String getMessageReference(MessageId identity) throws IOException
MessageStore
getMessageReference
in interface MessageStore
identity
- which contains either the messageID or the messageNumber
IOException
public void removeMessage(ConnectionContext context, MessageAck ack) throws IOException
MessageStore
removeMessage
in interface MessageStore
context
- 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.
IOException
public void removeMessage(MessageId msgId) throws IOException
IOException
public void recover(MessageRecoveryListener listener) throws Exception
MessageStore
recover
in interface MessageStore
Exception
public void start()
start
in interface Service
public void stop()
stop
in interface Service
public void removeAllMessages(ConnectionContext context) throws IOException
MessageStore
removeAllMessages
in interface MessageStore
context
- TODO
IOException
public ActiveMQDestination getDestination()
MessageStore
getDestination
in interface MessageStore
public void delete()
public void setUsageManager(UsageManager usageManager)
setUsageManager
in interface MessageStore
usageManager
- 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 |