|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface MessageGroupStore
Interface for storage operations on groups of messages linked by a correlation key.
Method Summary | |
---|---|
void |
addMessageToGroup(java.lang.Object correlationKey,
Message<?> message)
Store a message with an association to a correlation key. |
int |
expireMessageGroups(long timeout)
Extract all expired groups (whose timestamp is older than the current time less the threshold provided) and call each of the registered callbacks on them in turn. |
MessageGroup |
getMessageGroup(java.lang.Object correlationKey)
Return all Messages currently in the MessageStore that were stored using #addMessageToGroup(Object, Collection) with this correlation id. |
void |
markMessageGroup(MessageGroup group)
Persist the mark on all the messages from the group. |
void |
registerMessageGroupExpiryCallback(MessageGroupCallback callback)
Register a callback for when a message group is expired through expireMessageGroups(long) . |
void |
removeMessageGroup(java.lang.Object correlationKey)
Remove the message group with this correlation key. |
Method Detail |
---|
MessageGroup getMessageGroup(java.lang.Object correlationKey)
#addMessageToGroup(Object, Collection)
with this correlation id.
void addMessageToGroup(java.lang.Object correlationKey, Message<?> message)
correlationKey
- the correlation id to store the message undermessage
- a messagevoid markMessageGroup(MessageGroup group)
group
- a MessageGroup with no unmarked messagesvoid removeMessageGroup(java.lang.Object correlationKey)
correlationKey
- the correlation id to removevoid registerMessageGroupExpiryCallback(MessageGroupCallback callback)
expireMessageGroups(long)
.
callback
- a callback to execute when a message group is cleaned upint expireMessageGroups(long timeout)
timeout
- the timeout threshold to use
registerMessageGroupExpiryCallback(MessageGroupCallback)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |