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<MessageGroup>
,Aware
,BeanClassLoaderAware
,BasicMessageGroupStore
,MessageGroupStore
,MessageStore
public class RedisMessageStore extends AbstractKeyValueMessageStore implements BeanClassLoaderAware
Redis implementation of the key/value style
MessageStore
and
MessageGroupStore
- Since:
- 2.1
- Author:
- Oleg Zhurakousky, Gary Russell, Artem Bilan
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.springframework.integration.store.MessageGroupStore
MessageGroupStore.MessageGroupCallback
-
Field Summary
Fields inherited from class org.springframework.integration.store.AbstractKeyValueMessageStore
MESSAGE_GROUP_KEY_PREFIX, MESSAGE_KEY_PREFIX
-
Constructor Summary
Constructors Constructor Description RedisMessageStore(RedisConnectionFactory connectionFactory)
ConstructRedisMessageStore
based on the providedRedisConnectionFactory
and default empty prefix.RedisMessageStore(RedisConnectionFactory connectionFactory, String prefix)
ConstructRedisMessageStore
based on the providedRedisConnectionFactory
and prefix. -
Method Summary
Modifier and Type Method Description protected Collection<?>
doListKeys(String keyPattern)
protected Object
doRemove(Object id)
protected void
doRemoveAll(Collection<Object> ids)
protected Object
doRetrieve(Object id)
protected void
doStore(Object id, Object objectToStore)
protected void
doStoreIfAbsent(Object id, Object objectToStore)
void
setBeanClassLoader(ClassLoader classLoader)
void
setValueSerializer(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, setGroupCondition, setLastReleasedSequenceNumberForGroup, streamMessagesForGroup
Methods inherited from class org.springframework.integration.store.AbstractMessageGroupStore
addMessageToGroup, copy, expireMessageGroups, getMessageCountForAllMessageGroups, getMessageGroupCount, getMessageGroupFactory, isTimeoutOnIdle, registerMessageGroupExpiryCallback, removeMessagesFromGroup, setExpiryCallbacks, setLazyLoadMessageGroups, setTimeoutOnIdle
Methods inherited from class org.springframework.integration.store.AbstractBatchingMessageGroupStore
getRemoveBatchSize, setMessageGroupFactory, setRemoveBatchSize
-
Constructor Details
-
RedisMessageStore
ConstructRedisMessageStore
based on the providedRedisConnectionFactory
and default empty prefix.- Parameters:
connectionFactory
- the RedisConnectionFactory to use
-
RedisMessageStore
ConstructRedisMessageStore
based on the providedRedisConnectionFactory
and 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
- Specified by:
setBeanClassLoader
in interfaceBeanClassLoaderAware
-
setValueSerializer
-
doRetrieve
- Specified by:
doRetrieve
in classAbstractKeyValueMessageStore
-
doStore
- Specified by:
doStore
in classAbstractKeyValueMessageStore
-
doStoreIfAbsent
- Specified by:
doStoreIfAbsent
in classAbstractKeyValueMessageStore
-
doRemove
- Specified by:
doRemove
in classAbstractKeyValueMessageStore
-
doRemoveAll
- Specified by:
doRemoveAll
in classAbstractKeyValueMessageStore
-
doListKeys
- Specified by:
doListKeys
in classAbstractKeyValueMessageStore
-