public abstract class AbstractConfigurableMongoDbMessageStore
extends org.springframework.integration.store.AbstractMessageGroupStore
implements org.springframework.integration.store.BasicMessageGroupStore, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware
BasicMessageGroupStore implementation to provide configuration for common options
for implementations of this class.| Modifier and Type | Field and Description |
|---|---|
protected org.springframework.context.ApplicationContext |
applicationContext |
protected java.lang.String |
collectionName |
static java.lang.String |
CREATED_DATE_KEY
Deprecated.
since 5.0. This constant isn't used any more.
|
protected org.apache.commons.logging.Log |
logger |
protected org.springframework.data.mongodb.core.convert.MappingMongoConverter |
mappingMongoConverter |
protected org.springframework.integration.support.MessageBuilderFactory |
messageBuilderFactory |
protected org.springframework.data.mongodb.MongoDbFactory |
mongoDbFactory |
protected org.springframework.data.mongodb.core.MongoTemplate |
mongoTemplate |
static java.lang.String |
SAVED_KEY
Deprecated.
since 5.0. This constant isn't used any more.
|
static java.lang.String |
SEQUENCE_NAME |
| Constructor and Description |
|---|
AbstractConfigurableMongoDbMessageStore(org.springframework.data.mongodb.MongoDbFactory mongoDbFactory,
org.springframework.data.mongodb.core.convert.MappingMongoConverter mappingMongoConverter,
java.lang.String collectionName) |
AbstractConfigurableMongoDbMessageStore(org.springframework.data.mongodb.MongoDbFactory mongoDbFactory,
java.lang.String collectionName) |
AbstractConfigurableMongoDbMessageStore(org.springframework.data.mongodb.core.MongoTemplate mongoTemplate,
java.lang.String collectionName) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addMessageDocument(MessageDocument document) |
void |
addMessagesToGroup(java.lang.Object groupId,
org.springframework.messaging.Message<?>... messages) |
void |
afterPropertiesSet() |
void |
completeGroup(java.lang.Object groupId) |
org.springframework.messaging.Message<?> |
getMessage(java.util.UUID id) |
org.springframework.integration.store.MessageMetadata |
getMessageMetadata(java.util.UUID id) |
java.util.Collection<org.springframework.messaging.Message<?>> |
getMessagesForGroup(java.lang.Object groupId) |
protected int |
getNextId()
Perform MongoDB
INC operation for the document, which contains the MessageDocument
sequence, and return the new incremented value for the new MessageDocument. |
org.springframework.messaging.Message<?> |
getOneMessageFromGroup(java.lang.Object groupId) |
protected static org.springframework.data.mongodb.core.query.Query |
groupIdQuery(java.lang.Object groupId) |
java.util.Iterator<org.springframework.integration.store.MessageGroup> |
iterator() |
int |
messageGroupSize(java.lang.Object groupId) |
void |
removeMessageGroup(java.lang.Object groupId) |
void |
removeMessagesFromGroup(java.lang.Object key,
java.util.Collection<org.springframework.messaging.Message<?>> messages) |
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext) |
void |
setLastReleasedSequenceNumberForGroup(java.lang.Object groupId,
int sequenceNumber) |
addMessageToGroup, copy, expireMessageGroups, getGroupMetadata, getMessageCountForAllMessageGroups, getMessageGroupCount, getMessageGroupFactory, isTimeoutOnIdle, registerMessageGroupExpiryCallback, removeMessagesFromGroup, setExpiryCallbacks, setLazyLoadMessageGroups, setTimeoutOnIdlegetRemoveBatchSize, setMessageGroupFactory, setRemoveBatchSizeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpublic static final java.lang.String SEQUENCE_NAME
@Deprecated public static final java.lang.String SAVED_KEY
@Deprecated public static final java.lang.String CREATED_DATE_KEY
protected final org.apache.commons.logging.Log logger
protected final java.lang.String collectionName
protected final org.springframework.data.mongodb.MongoDbFactory mongoDbFactory
protected org.springframework.data.mongodb.core.MongoTemplate mongoTemplate
protected org.springframework.data.mongodb.core.convert.MappingMongoConverter mappingMongoConverter
protected org.springframework.context.ApplicationContext applicationContext
protected org.springframework.integration.support.MessageBuilderFactory messageBuilderFactory
public AbstractConfigurableMongoDbMessageStore(org.springframework.data.mongodb.core.MongoTemplate mongoTemplate,
java.lang.String collectionName)
public AbstractConfigurableMongoDbMessageStore(org.springframework.data.mongodb.MongoDbFactory mongoDbFactory,
java.lang.String collectionName)
public AbstractConfigurableMongoDbMessageStore(org.springframework.data.mongodb.MongoDbFactory mongoDbFactory,
org.springframework.data.mongodb.core.convert.MappingMongoConverter mappingMongoConverter,
java.lang.String collectionName)
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
throws org.springframework.beans.BeansException
setApplicationContext in interface org.springframework.context.ApplicationContextAwareorg.springframework.beans.BeansExceptionpublic void afterPropertiesSet()
throws java.lang.Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanjava.lang.Exceptionpublic org.springframework.messaging.Message<?> getMessage(java.util.UUID id)
public org.springframework.integration.store.MessageMetadata getMessageMetadata(java.util.UUID id)
public void removeMessageGroup(java.lang.Object groupId)
removeMessageGroup in interface org.springframework.integration.store.BasicMessageGroupStorepublic int messageGroupSize(java.lang.Object groupId)
messageGroupSize in interface org.springframework.integration.store.BasicMessageGroupStoreprotected int getNextId()
INC operation for the document, which contains the MessageDocument
sequence, and return the new incremented value for the new MessageDocument.
The SEQUENCE_NAME document is created on demand.protected void addMessageDocument(MessageDocument document)
protected static org.springframework.data.mongodb.core.query.Query groupIdQuery(java.lang.Object groupId)
public void removeMessagesFromGroup(java.lang.Object key,
java.util.Collection<org.springframework.messaging.Message<?>> messages)
removeMessagesFromGroup in interface org.springframework.integration.store.MessageGroupStorepublic void setLastReleasedSequenceNumberForGroup(java.lang.Object groupId,
int sequenceNumber)
setLastReleasedSequenceNumberForGroup 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 org.springframework.messaging.Message<?> getOneMessageFromGroup(java.lang.Object groupId)
getOneMessageFromGroup in interface org.springframework.integration.store.MessageGroupStorepublic void addMessagesToGroup(java.lang.Object groupId,
org.springframework.messaging.Message<?>... messages)
addMessagesToGroup in interface org.springframework.integration.store.MessageGroupStorepublic java.util.Collection<org.springframework.messaging.Message<?>> getMessagesForGroup(java.lang.Object groupId)
getMessagesForGroup in interface org.springframework.integration.store.MessageGroupStore