public interface MessageGroupStore extends BasicMessageGroupStore
| Modifier and Type | Interface and Description |
|---|---|
static interface |
MessageGroupStore.MessageGroupCallback
Invoked when a MessageGroupStore expires a group.
|
| Modifier and Type | Method and Description |
|---|---|
void |
completeGroup(Object groupId)
Completes this MessageGroup.
|
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.
|
MessageGroupMetadata |
getGroupMetadata(Object groupId)
Obtain the group metadata without fetching any messages; must supply all other
group properties; may include the id of the first message.
|
int |
getMessageCountForAllMessageGroups()
Optional attribute giving the number of messages in the store over all groups.
|
int |
getMessageGroupCount()
Optional attribute giving the number of message groups.
|
Message<?> |
getOneMessageFromGroup(Object groupId)
Return the one
Message from MessageGroup. |
Iterator<MessageGroup> |
iterator() |
void |
registerMessageGroupExpiryCallback(MessageGroupStore.MessageGroupCallback callback)
Register a callback for when a message group is expired through
expireMessageGroups(long). |
MessageGroup |
removeMessageFromGroup(Object key,
Message<?> messageToRemove)
Persist the deletion of a single message from the group.
|
void |
removeMessagesFromGroup(Object key,
Collection<Message<?>> messages)
Persist the deletion of messages from the group.
|
void |
removeMessagesFromGroup(Object key,
Message<?>... messages)
Persist the deletion of messages from the group.
|
void |
setLastReleasedSequenceNumberForGroup(Object groupId,
int sequenceNumber)
Allows you to set the sequence number of the last released Message.
|
addMessageToGroup, getMessageGroup, messageGroupSize, pollMessageFromGroup, removeMessageGroup@ManagedAttribute int getMessageCountForAllMessageGroups()
UnsupportedOperationException - if not implemented@ManagedAttribute int getMessageGroupCount()
UnsupportedOperationException - if not implementedMessageGroup removeMessageFromGroup(Object key, Message<?> messageToRemove)
key - The groupId for the group containing the message.messageToRemove - The message to be removed.void removeMessagesFromGroup(Object key, Collection<Message<?>> messages)
key - The groupId for the group containing the message(s).messages - The messages to be removed.void removeMessagesFromGroup(Object key, Message<?>... messages)
key - The groupId for the group containing the message(s).messages - The messages to be removed.void registerMessageGroupExpiryCallback(MessageGroupStore.MessageGroupCallback callback)
expireMessageGroups(long).callback - A callback to execute when a message group is cleaned up.@ManagedOperation int expireMessageGroups(long timeout)
timeout - the timeout threshold to useregisterMessageGroupExpiryCallback(MessageGroupCallback)void setLastReleasedSequenceNumberForGroup(Object groupId, int sequenceNumber)
groupId - The group identifier.sequenceNumber - The sequence number.Iterator<MessageGroup> iterator()
MessageGroups.void completeGroup(Object groupId)
groupId - The group identifier.MessageGroupMetadata getGroupMetadata(Object groupId)
groupId - The group id.Message<?> getOneMessageFromGroup(Object groupId)
Message from MessageGroup.groupId - The group identifier.Message.