|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.springframework.integration.store.AbstractMessageGroupStore
org.springframework.integration.gemfire.store.KeyValueMessageGroupStore
public class KeyValueMessageGroupStore
Provides an implementation of MessageGroupStore that delegates to a backend Gemfire instance.
Gemfire holds keys and values. This class provides a strategy to hold objects.
| Field Summary | |
|---|---|
protected java.util.Map<java.lang.Object,KeyValueMessageGroup> |
groupIdToMessageGroup
Required Region to managed the association of groups => KeyValueMessageGroup |
protected java.util.Map<java.lang.String,Message<?>> |
marked
Required Region to manage the #marked data |
protected java.util.Map<java.lang.String,Message<?>> |
unmarked
Required Region to manage the #unmarked data |
| Fields inherited from class org.springframework.integration.store.AbstractMessageGroupStore |
|---|
logger |
| Constructor Summary | |
|---|---|
KeyValueMessageGroupStore(java.util.Map<java.lang.Object,KeyValueMessageGroup> groupIdToMessageGroup,
java.util.Map<java.lang.String,Message<?>> marked,
java.util.Map<java.lang.String,Message<?>> unmarked)
Create a KeyValueMessageGroupStore with two backing regions to handle the state management. |
|
| Method Summary | |
|---|---|
MessageGroup |
addMessageToGroup(java.lang.Object groupId,
Message<?> message)
Store a message with an association to a group id. |
protected KeyValueMessageGroup |
ensureMessageGroupHasReferencesToRegions(KeyValueMessageGroup keyValueMessageGroup)
|
MessageGroup |
getMessageGroup(java.lang.Object groupId)
Return all Messages currently in the MessageStore that were stored using MessageGroupStore.addMessageToGroup(Object, Message) with this group id. |
protected KeyValueMessageGroup |
getMessageGroupInternal(java.lang.Object groupId)
|
java.util.Iterator<MessageGroup> |
iterator()
|
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. |
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. |
| Methods inherited from class org.springframework.integration.store.AbstractMessageGroupStore |
|---|
expireMessageGroups, getMarkedMessageCountForAllMessageGroups, getMessageCountForAllMessageGroups, getMessageGroupCount, registerMessageGroupExpiryCallback, setExpiryCallbacks |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.util.Map<java.lang.Object,KeyValueMessageGroup> groupIdToMessageGroup
Region to managed the association of groups => KeyValueMessageGroup
protected java.util.Map<java.lang.String,Message<?>> unmarked
Region to manage the #unmarked data
protected java.util.Map<java.lang.String,Message<?>> marked
Region to manage the #marked data
| Constructor Detail |
|---|
public KeyValueMessageGroupStore(java.util.Map<java.lang.Object,KeyValueMessageGroup> groupIdToMessageGroup,
java.util.Map<java.lang.String,Message<?>> marked,
java.util.Map<java.lang.String,Message<?>> unmarked)
groupIdToMessageGroup - the region to associatemarked - the collection that will hold which messages are marked (delivered)unmarked - the collection that holds which messages are unmarked (not yet delivered)| Method Detail |
|---|
public MessageGroup getMessageGroup(java.lang.Object groupId)
MessageGroupStoreMessageGroupStore.addMessageToGroup(Object, Message) with this group id.
public MessageGroup addMessageToGroup(java.lang.Object groupId,
Message<?> message)
MessageGroupStore
groupId - the group id to store the message undermessage - a messagepublic MessageGroup markMessageGroup(MessageGroup group)
MessageGroupStore
group - a MessageGroup with no unmarked messagespublic void removeMessageGroup(java.lang.Object groupId)
MessageGroupStore
groupId - the id of the group to remove
public MessageGroup removeMessageFromGroup(java.lang.Object key,
Message<?> messageToRemove)
MessageGroupStore
key - the groupId for the group containing the messagemessageToRemove - the message to be removed
public MessageGroup markMessageFromGroup(java.lang.Object key,
Message<?> messageToMark)
MessageGroupStore
key - the groupId for the group containing the messagemessageToMark - the message to be markedpublic java.util.Iterator<MessageGroup> iterator()
iterator in interface java.lang.Iterable<MessageGroup>iterator in class AbstractMessageGroupStoreprotected KeyValueMessageGroup ensureMessageGroupHasReferencesToRegions(KeyValueMessageGroup keyValueMessageGroup)
protected KeyValueMessageGroup getMessageGroupInternal(java.lang.Object groupId)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||