Interface BasicMessageGroupStore
- All Known Subinterfaces:
ChannelMessageStore,MessageGroupStore,PriorityCapableChannelMessageStore
- All Known Implementing Classes:
AbstractBatchingMessageGroupStore,AbstractConfigurableMongoDbMessageStore,AbstractKeyValueMessageStore,AbstractMessageGroupStore,ConfigurableMongoDbMessageStore,HazelcastMessageStore,JdbcChannelMessageStore,JdbcMessageStore,MongoDbChannelMessageStore,MongoDbMessageStore,RedisChannelMessageStore,RedisChannelPriorityMessageStore,RedisMessageStore,SimpleMessageStore
public interface BasicMessageGroupStore
Defines a minimal message group store with basic capabilities.
- Since:
- 4.0
- Author:
- Gary Russell
-
Method Summary
Modifier and TypeMethodDescriptionaddMessageToGroup(Object groupId, Message<?> message) Store a message with an association to a group id.getMessageGroup(Object groupId) Return all Messages currently in the MessageStore that were stored usingaddMessageToGroup(Object, Message)with this group id.intmessageGroupSize(Object groupId) Return the size of this MessageGroup.Message<?> pollMessageFromGroup(Object groupId) Poll Message from thisMessageGroup(in FIFO style if supported by the implementation) while also removing the polledMessage.voidremoveMessageGroup(Object groupId) Remove the message group with this id.
-
Method Details
-
messageGroupSize
Return the size of this MessageGroup.- Parameters:
groupId- The group identifier.- Returns:
- The size.
-
getMessageGroup
Return all Messages currently in the MessageStore that were stored usingaddMessageToGroup(Object, Message)with this group id.- Parameters:
groupId- The group identifier.- Returns:
- A group of messages, empty if none exists for this key.
-
addMessageToGroup
Store a message with an association to a group id. This can be used to group messages together.- Parameters:
groupId- The group id to store the message under.message- A message.- Returns:
- The message group.
-
pollMessageFromGroup
Poll Message from thisMessageGroup(in FIFO style if supported by the implementation) while also removing the polledMessage.- Parameters:
groupId- The group identifier.- Returns:
- The message.
-
removeMessageGroup
Remove the message group with this id.- Parameters:
groupId- The id of the group to remove.
-