public class MongoDbMessageStore
extends org.springframework.integration.store.AbstractMessageGroupStore
implements org.springframework.integration.store.MessageStore, org.springframework.beans.factory.BeanClassLoaderAware
MessageStore and MessageGroupStore
strategies that relies upon MongoDB for persistence.| Constructor and Description |
|---|
MongoDbMessageStore(org.springframework.data.mongodb.MongoDbFactory mongoDbFactory)
Create a MongoDbMessageStore using the provided
MongoDbFactory.and the default collection name. |
MongoDbMessageStore(org.springframework.data.mongodb.MongoDbFactory mongoDbFactory,
java.lang.String collectionName)
Create a MongoDbMessageStore using the provided
MongoDbFactory and collection name. |
| Modifier and Type | Method and Description |
|---|---|
<T> org.springframework.integration.Message<T> |
addMessage(org.springframework.integration.Message<T> message) |
org.springframework.integration.store.MessageGroup |
addMessageToGroup(java.lang.Object groupId,
org.springframework.integration.Message<?> message) |
void |
completeGroup(java.lang.Object groupId) |
org.springframework.integration.Message<?> |
getMessage(java.util.UUID id) |
long |
getMessageCount() |
org.springframework.integration.store.MessageGroup |
getMessageGroup(java.lang.Object groupId) |
java.util.Iterator<org.springframework.integration.store.MessageGroup> |
iterator() |
int |
messageGroupSize(java.lang.Object groupId) |
org.springframework.integration.Message<?> |
pollMessageFromGroup(java.lang.Object groupId) |
org.springframework.integration.Message<?> |
removeMessage(java.util.UUID id) |
org.springframework.integration.store.MessageGroup |
removeMessageFromGroup(java.lang.Object groupId,
org.springframework.integration.Message<?> messageToRemove) |
void |
removeMessageGroup(java.lang.Object groupId) |
void |
setBeanClassLoader(java.lang.ClassLoader classLoader) |
void |
setLastReleasedSequenceNumberForGroup(java.lang.Object groupId,
int sequenceNumber) |
public MongoDbMessageStore(org.springframework.data.mongodb.MongoDbFactory mongoDbFactory)
MongoDbFactory.and the default collection name.public MongoDbMessageStore(org.springframework.data.mongodb.MongoDbFactory mongoDbFactory,
java.lang.String collectionName)
MongoDbFactory and collection name.public void setBeanClassLoader(java.lang.ClassLoader classLoader)
setBeanClassLoader in interface org.springframework.beans.factory.BeanClassLoaderAwarepublic <T> org.springframework.integration.Message<T> addMessage(org.springframework.integration.Message<T> message)
addMessage in interface org.springframework.integration.store.MessageStorepublic org.springframework.integration.Message<?> getMessage(java.util.UUID id)
getMessage in interface org.springframework.integration.store.MessageStore@ManagedAttribute public long getMessageCount()
getMessageCount in interface org.springframework.integration.store.MessageStorepublic org.springframework.integration.Message<?> removeMessage(java.util.UUID id)
removeMessage in interface org.springframework.integration.store.MessageStorepublic org.springframework.integration.store.MessageGroup getMessageGroup(java.lang.Object groupId)
getMessageGroup in interface org.springframework.integration.store.MessageGroupStorepublic org.springframework.integration.store.MessageGroup addMessageToGroup(java.lang.Object groupId,
org.springframework.integration.Message<?> message)
addMessageToGroup in interface org.springframework.integration.store.MessageGroupStorepublic org.springframework.integration.store.MessageGroup removeMessageFromGroup(java.lang.Object groupId,
org.springframework.integration.Message<?> messageToRemove)
removeMessageFromGroup in interface org.springframework.integration.store.MessageGroupStorepublic void removeMessageGroup(java.lang.Object groupId)
removeMessageGroup in interface org.springframework.integration.store.MessageGroupStorepublic java.util.Iterator<org.springframework.integration.store.MessageGroup> iterator()
iterator in interface java.lang.Iterable<org.springframework.integration.store.MessageGroup>iterator in interface org.springframework.integration.store.MessageGroupStorepublic void completeGroup(java.lang.Object groupId)
completeGroup in interface org.springframework.integration.store.MessageGroupStorepublic void setLastReleasedSequenceNumberForGroup(java.lang.Object groupId,
int sequenceNumber)
setLastReleasedSequenceNumberForGroup in interface org.springframework.integration.store.MessageGroupStorepublic org.springframework.integration.Message<?> pollMessageFromGroup(java.lang.Object groupId)
pollMessageFromGroup in interface org.springframework.integration.store.MessageGroupStorepublic int messageGroupSize(java.lang.Object groupId)
messageGroupSize in interface org.springframework.integration.store.MessageGroupStore