Class RedisMessageStore
java.lang.Object
org.springframework.integration.store.AbstractBatchingMessageGroupStore
org.springframework.integration.store.AbstractMessageGroupStore
org.springframework.integration.store.AbstractKeyValueMessageStore
org.springframework.integration.redis.store.RedisMessageStore
- All Implemented Interfaces:
java.lang.Iterable<org.springframework.integration.store.MessageGroup>,org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanClassLoaderAware,org.springframework.integration.store.BasicMessageGroupStore,org.springframework.integration.store.MessageGroupStore,org.springframework.integration.store.MessageStore
public class RedisMessageStore
extends org.springframework.integration.store.AbstractKeyValueMessageStore
implements org.springframework.beans.factory.BeanClassLoaderAware
Redis implementation of the key/value style
MessageStore and
MessageGroupStore- Since:
- 2.1
-
Nested Class Summary
-
Field Summary
-
Constructor Summary
Constructors Constructor Description RedisMessageStore(org.springframework.data.redis.connection.RedisConnectionFactory connectionFactory)ConstructRedisMessageStorebased on the providedRedisConnectionFactoryand default empty prefix.RedisMessageStore(org.springframework.data.redis.connection.RedisConnectionFactory connectionFactory, java.lang.String prefix)ConstructRedisMessageStorebased on the providedRedisConnectionFactoryand prefix. -
Method Summary
Modifier and Type Method Description protected java.util.Collection<?>doListKeys(java.lang.String keyPattern)protected java.lang.ObjectdoRemove(java.lang.Object id)protected voiddoRemoveAll(java.util.Collection<java.lang.Object> ids)protected java.lang.ObjectdoRetrieve(java.lang.Object id)protected voiddoStore(java.lang.Object id, java.lang.Object objectToStore)protected voiddoStoreIfAbsent(java.lang.Object id, java.lang.Object objectToStore)voidsetBeanClassLoader(java.lang.ClassLoader classLoader)voidsetValueSerializer(org.springframework.data.redis.serializer.RedisSerializer<?> valueSerializer)Methods inherited from class org.springframework.integration.store.AbstractKeyValueMessageStore
addMessage, addMessagesToGroup, completeGroup, doAddMessage, getGroupMetadata, getGroupPrefix, getMessage, getMessageCount, getMessageGroup, getMessageMetadata, getMessagePrefix, getMessagesForGroup, getOneMessageFromGroup, iterator, messageGroupSize, pollMessageFromGroup, removeMessage, removeMessageGroup, removeMessagesFromGroup, setLastReleasedSequenceNumberForGroup, streamMessagesForGroupMethods inherited from class org.springframework.integration.store.AbstractMessageGroupStore
addMessageToGroup, copy, expireMessageGroups, getMessageCountForAllMessageGroups, getMessageGroupCount, getMessageGroupFactory, isTimeoutOnIdle, registerMessageGroupExpiryCallback, removeMessagesFromGroup, setExpiryCallbacks, setLazyLoadMessageGroups, setTimeoutOnIdleMethods inherited from class org.springframework.integration.store.AbstractBatchingMessageGroupStore
getRemoveBatchSize, setMessageGroupFactory, setRemoveBatchSize
-
Constructor Details
-
RedisMessageStore
public RedisMessageStore(org.springframework.data.redis.connection.RedisConnectionFactory connectionFactory)ConstructRedisMessageStorebased on the providedRedisConnectionFactoryand default empty prefix.- Parameters:
connectionFactory- the RedisConnectionFactory to use
-
RedisMessageStore
public RedisMessageStore(org.springframework.data.redis.connection.RedisConnectionFactory connectionFactory, java.lang.String prefix)ConstructRedisMessageStorebased on the providedRedisConnectionFactoryand prefix.- Parameters:
connectionFactory- the RedisConnectionFactory to useprefix- the key prefix to use, allowing the same broker to be used for multiple stores.- Since:
- 4.3.12
- See Also:
AbstractKeyValueMessageStore(String)
-
-
Method Details
-
setBeanClassLoader
public void setBeanClassLoader(java.lang.ClassLoader classLoader)- Specified by:
setBeanClassLoaderin interfaceorg.springframework.beans.factory.BeanClassLoaderAware
-
setValueSerializer
public void setValueSerializer(org.springframework.data.redis.serializer.RedisSerializer<?> valueSerializer) -
doRetrieve
protected java.lang.Object doRetrieve(java.lang.Object id)- Specified by:
doRetrievein classorg.springframework.integration.store.AbstractKeyValueMessageStore
-
doStore
protected void doStore(java.lang.Object id, java.lang.Object objectToStore)- Specified by:
doStorein classorg.springframework.integration.store.AbstractKeyValueMessageStore
-
doStoreIfAbsent
protected void doStoreIfAbsent(java.lang.Object id, java.lang.Object objectToStore)- Specified by:
doStoreIfAbsentin classorg.springframework.integration.store.AbstractKeyValueMessageStore
-
doRemove
protected java.lang.Object doRemove(java.lang.Object id)- Specified by:
doRemovein classorg.springframework.integration.store.AbstractKeyValueMessageStore
-
doRemoveAll
protected void doRemoveAll(java.util.Collection<java.lang.Object> ids)- Specified by:
doRemoveAllin classorg.springframework.integration.store.AbstractKeyValueMessageStore
-
doListKeys
protected java.util.Collection<?> doListKeys(java.lang.String keyPattern)- Specified by:
doListKeysin classorg.springframework.integration.store.AbstractKeyValueMessageStore
-