|
|||||||||
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 group id.
Method Summary | |
---|---|
MessageGroup |
addMessageToGroup(java.lang.Object groupId,
Message<?> message)
Store a message with an association to a group id. |
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. |
int |
getMarkedMessageCountForAllMessageGroups()
Optional attribute giving the number of marked messages in the store for all groups. |
int |
getMessageCountForAllMessageGroups()
Optional attribute giving the number of messages in the store over all groups. |
MessageGroup |
getMessageGroup(java.lang.Object groupId)
Return all Messages currently in the MessageStore that were stored using addMessageToGroup(Object, Message) with this group id. |
int |
getMessageGroupCount()
Optional attribute giving the number of message groups. |
MessageGroup |
markMessageFromGroup(java.lang.Object key,
Message<?> messageToMark)
Persist a mark on a single message from the group. |
MessageGroup |
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) . |
MessageGroup |
removeMessageFromGroup(java.lang.Object key,
Message<?> messageToRemove)
Persist a deletion on a single message from the group. |
void |
removeMessageGroup(java.lang.Object groupId)
Remove the message group with this id. |
Method Detail |
---|
@ManagedAttribute int getMessageCountForAllMessageGroups()
java.lang.UnsupportedOperationException
- if not implemented@ManagedAttribute int getMarkedMessageCountForAllMessageGroups()
java.lang.UnsupportedOperationException
- if not implemented@ManagedAttribute int getMessageGroupCount()
java.lang.UnsupportedOperationException
- if not implementedMessageGroup getMessageGroup(java.lang.Object groupId)
addMessageToGroup(Object, Message)
with this group id.
MessageGroup addMessageToGroup(java.lang.Object groupId, Message<?> message)
groupId
- the group id to store the message undermessage
- a messageMessageGroup markMessageGroup(MessageGroup group)
group
- a MessageGroup with no unmarked messagesMessageGroup removeMessageFromGroup(java.lang.Object key, Message<?> messageToRemove)
key
- the groupId for the group containing the messagemessageToRemove
- the message to be removedMessageGroup markMessageFromGroup(java.lang.Object key, Message<?> messageToMark)
key
- the groupId for the group containing the messagemessageToMark
- the message to be markedvoid removeMessageGroup(java.lang.Object groupId)
groupId
- the id of the group 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 |