Class RedisChannelPriorityMessageStore
java.lang.Object
org.springframework.integration.redis.store.RedisChannelMessageStore
org.springframework.integration.redis.store.RedisChannelPriorityMessageStore
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanClassLoaderAware,org.springframework.beans.factory.BeanNameAware,org.springframework.beans.factory.InitializingBean,org.springframework.integration.store.BasicMessageGroupStore,org.springframework.integration.store.ChannelMessageStore,org.springframework.integration.store.PriorityCapableChannelMessageStore
public class RedisChannelPriorityMessageStore extends RedisChannelMessageStore implements org.springframework.integration.store.PriorityCapableChannelMessageStore
Specialized Redis
PriorityCapableChannelMessageStore that uses lists to back a QueueChannel.
Messages are removed in priority order (IntegrationMessageHeaderAccessor.PRIORITY).
Priorities 0-9 are supported (9 the highest); invalid priority values are treated with the same priority (none)
as messages with no priority header (retrieved after any messages that have a priority).
Requires that groupId is a String.
- Since:
- 4.0
-
Constructor Summary
Constructors Constructor Description RedisChannelPriorityMessageStore(org.springframework.data.redis.connection.RedisConnectionFactory connectionFactory) -
Method Summary
Modifier and Type Method Description org.springframework.integration.store.MessageGroupaddMessageToGroup(java.lang.Object groupId, org.springframework.messaging.Message<?> message)intgetMessageCountForAllMessageGroups()org.springframework.integration.store.MessageGroupgetMessageGroup(java.lang.Object groupId)intgetMessageGroupCount()booleanisPriorityEnabled()intmessageGroupSize(java.lang.Object groupId)org.springframework.messaging.Message<?>pollMessageFromGroup(java.lang.Object groupId)voidremoveMessageGroup(java.lang.Object groupId)Methods inherited from class org.springframework.integration.redis.store.RedisChannelMessageStore
afterPropertiesSet, getBeanName, getMessageGroupFactory, getRedisTemplate, setBeanClassLoader, setBeanName, setMessageGroupFactory, setValueSerializer
-
Constructor Details
-
RedisChannelPriorityMessageStore
public RedisChannelPriorityMessageStore(org.springframework.data.redis.connection.RedisConnectionFactory connectionFactory)
-
-
Method Details
-
isPriorityEnabled
public boolean isPriorityEnabled()- Specified by:
isPriorityEnabledin interfaceorg.springframework.integration.store.PriorityCapableChannelMessageStore
-
messageGroupSize
@ManagedAttribute public int messageGroupSize(java.lang.Object groupId)- Specified by:
messageGroupSizein interfaceorg.springframework.integration.store.BasicMessageGroupStore- Overrides:
messageGroupSizein classRedisChannelMessageStore
-
getMessageGroup
public org.springframework.integration.store.MessageGroup getMessageGroup(java.lang.Object groupId)- Specified by:
getMessageGroupin interfaceorg.springframework.integration.store.BasicMessageGroupStore- Overrides:
getMessageGroupin classRedisChannelMessageStore
-
addMessageToGroup
public org.springframework.integration.store.MessageGroup addMessageToGroup(java.lang.Object groupId, org.springframework.messaging.Message<?> message)- Specified by:
addMessageToGroupin interfaceorg.springframework.integration.store.BasicMessageGroupStore- Overrides:
addMessageToGroupin classRedisChannelMessageStore
-
pollMessageFromGroup
public org.springframework.messaging.Message<?> pollMessageFromGroup(java.lang.Object groupId)- Specified by:
pollMessageFromGroupin interfaceorg.springframework.integration.store.BasicMessageGroupStore- Overrides:
pollMessageFromGroupin classRedisChannelMessageStore
-
getMessageGroupCount
@ManagedAttribute public int getMessageGroupCount()- Overrides:
getMessageGroupCountin classRedisChannelMessageStore
-
removeMessageGroup
public void removeMessageGroup(java.lang.Object groupId)- Specified by:
removeMessageGroupin interfaceorg.springframework.integration.store.BasicMessageGroupStore- Overrides:
removeMessageGroupin classRedisChannelMessageStore
-
getMessageCountForAllMessageGroups
@ManagedAttribute public int getMessageCountForAllMessageGroups()- Overrides:
getMessageCountForAllMessageGroupsin classRedisChannelMessageStore
-