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:
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
Nested classes/interfaces inherited from interface org.springframework.integration.store.MessageGroupStore
org.springframework.integration.store.MessageGroupStore.MessageGroupCallback -
Field Summary
Fields inherited from class org.springframework.integration.store.AbstractKeyValueMessageStore
MESSAGE_GROUP_KEY_PREFIX, MESSAGE_KEY_PREFIXFields inherited from class org.springframework.integration.store.AbstractMessageGroupStore
INTERRUPTED_WHILE_OBTAINING_LOCK, logger -
Constructor Summary
ConstructorsConstructorDescriptionRedisMessageStore(org.springframework.data.redis.connection.RedisConnectionFactory connectionFactory) ConstructRedisMessageStorebased on the providedRedisConnectionFactoryand default empty prefix.RedisMessageStore(org.springframework.data.redis.connection.RedisConnectionFactory connectionFactory, String prefix) ConstructRedisMessageStorebased on the providedRedisConnectionFactoryand prefix. -
Method Summary
Modifier and TypeMethodDescriptionprotected Collection<?> doListKeys(String keyPattern) protected Objectprotected voiddoRemoveAll(Collection<Object> ids) protected ObjectdoRetrieve(Object id) protected voidprotected voiddoStoreIfAbsent(Object id, Object objectToStore) voidsetBeanClassLoader(ClassLoader classLoader) voidsetValueSerializer(org.springframework.data.redis.serializer.RedisSerializer<?> valueSerializer) Methods inherited from class org.springframework.integration.store.AbstractKeyValueMessageStore
addMessage, doAddMessage, doAddMessage, doAddMessagesToGroup, doCompleteGroup, doPollMessageFromGroup, doRemoveMessageFromGroupById, doRemoveMessageGroup, doRemoveMessagesFromGroup, doSetGroupCondition, doSetLastReleasedSequenceNumberForGroup, getGroupMetadata, getGroupPrefix, getMessage, getMessageCount, getMessageFromGroup, getMessageGroup, getMessageMetadata, getMessagePrefix, getMessagesForGroup, getOneMessageFromGroup, iterator, messageGroupSize, removeMessage, streamMessagesForGroupMethods inherited from class org.springframework.integration.store.AbstractMessageGroupStore
addMessagesToGroup, addMessageToGroup, completeGroup, copy, executeLocked, executeLocked, expireMessageGroups, getLockRegistry, getMessageCountForAllMessageGroups, getMessageGroupCount, getMessageGroupFactory, isTimeoutOnIdle, pollMessageFromGroup, registerMessageGroupExpiryCallback, removeMessageFromGroupById, removeMessageGroup, removeMessagesFromGroup, removeMessagesFromGroup, setExpiryCallbacks, setGroupCondition, setLastReleasedSequenceNumberForGroup, setLazyLoadMessageGroups, setLockRegistry, setTimeoutOnIdleMethods inherited from class org.springframework.integration.store.AbstractBatchingMessageGroupStore
getRemoveBatchSize, setMessageGroupFactory, setRemoveBatchSizeMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Iterable
forEach, spliterator
-
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, 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:
-
-
Method Details
-
setBeanClassLoader
- Specified by:
setBeanClassLoaderin interfaceorg.springframework.beans.factory.BeanClassLoaderAware
-
setValueSerializer
public void setValueSerializer(org.springframework.data.redis.serializer.RedisSerializer<?> valueSerializer) -
doRetrieve
-
doStore
-
doStoreIfAbsent
-
doRemove
-
doRemoveAll
- Specified by:
doRemoveAllin classorg.springframework.integration.store.AbstractKeyValueMessageStore
-
doListKeys
- Specified by:
doListKeysin classorg.springframework.integration.store.AbstractKeyValueMessageStore
-