public class RedisMessageStore extends AbstractKeyValueMessageStore implements BeanClassLoaderAware
MessageStore
and
MessageGroupStore
MessageGroupStore.MessageGroupCallback
MESSAGE_GROUP_KEY_PREFIX, MESSAGE_KEY_PREFIX
logger
Constructor and Description |
---|
RedisMessageStore(RedisConnectionFactory connectionFactory)
Construct
RedisMessageStore based on the provided
RedisConnectionFactory and default empty prefix. |
RedisMessageStore(RedisConnectionFactory connectionFactory,
String prefix)
Construct
RedisMessageStore based on the provided
RedisConnectionFactory and prefix. |
Modifier and Type | Method and 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) |
addMessage, addMessagesToGroup, completeGroup, doAddMessage, getGroupMetadata, getGroupPrefix, getMessage, getMessageCount, getMessageGroup, getMessageMetadata, getMessagePrefix, getMessagesForGroup, getOneMessageFromGroup, iterator, messageGroupSize, pollMessageFromGroup, removeMessage, removeMessageGroup, removeMessagesFromGroup, setLastReleasedSequenceNumberForGroup
addMessageToGroup, copy, expireMessageGroups, getMessageCountForAllMessageGroups, getMessageGroupCount, getMessageGroupFactory, isTimeoutOnIdle, registerMessageGroupExpiryCallback, removeMessagesFromGroup, setExpiryCallbacks, setLazyLoadMessageGroups, setTimeoutOnIdle
getRemoveBatchSize, setMessageGroupFactory, setRemoveBatchSize
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public RedisMessageStore(RedisConnectionFactory connectionFactory)
RedisMessageStore
based on the provided
RedisConnectionFactory
and default empty prefix.connectionFactory
- the RedisConnectionFactory to usepublic RedisMessageStore(RedisConnectionFactory connectionFactory, String prefix)
RedisMessageStore
based on the provided
RedisConnectionFactory
and prefix.connectionFactory
- the RedisConnectionFactory to useprefix
- the key prefix to use, allowing the same broker to be used for
multiple stores.AbstractKeyValueMessageStore.AbstractKeyValueMessageStore(String)
public void setBeanClassLoader(ClassLoader classLoader)
setBeanClassLoader
in interface BeanClassLoaderAware
public void setValueSerializer(RedisSerializer<?> valueSerializer)
protected Object doRetrieve(Object id)
doRetrieve
in class AbstractKeyValueMessageStore
protected void doStore(Object id, Object objectToStore)
doStore
in class AbstractKeyValueMessageStore
protected void doStoreIfAbsent(Object id, Object objectToStore)
doStoreIfAbsent
in class AbstractKeyValueMessageStore
protected Object doRemove(Object id)
doRemove
in class AbstractKeyValueMessageStore
protected void doRemoveAll(Collection<Object> ids)
doRemoveAll
in class AbstractKeyValueMessageStore
protected Collection<?> doListKeys(String keyPattern)
doListKeys
in class AbstractKeyValueMessageStore