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.
|
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.
|
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 a deletion on a single message 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 registerMessageGroupExpiryCallback(MessageGroupStore.MessageGroupCallback callback)
expireMessageGroups(long)
.callback
- A callback to execute when a message group is cleaned up.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()
MessageGroup
s.void completeGroup(Object groupId)
groupId
- The group identifier.