public class RedisChannelMessageStore extends ObjectSE implements ChannelMessageStore, BeanNameAware, InitializingBean, BeanClassLoaderAware
ChannelMessageStore。 キーの一部として使用される setBeanName(String) が必要です。
| コンストラクターと説明 |
|---|
RedisChannelMessageStore(RedisConnectionFactory connectionFactory) メッセージに Java 直列化を使用するメッセージストアを構築します。 |
cloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, toStringSE, waitSE, waitSE, waitSEpublic RedisChannelMessageStore(RedisConnectionFactory connectionFactory)
connectionFactory - redis 接続ファクトリ。public void setBeanClassLoader(ClassLoaderSE classLoader)
BeanClassLoaderAware 内の setBeanClassLoader public void setValueSerializer(RedisSerializer<?> valueSerializer)
Message のデフォルトは JdkSerializationRedisSerializer です。valueSerializer - 値シリアライザー。public void setMessageGroupFactory(MessageGroupFactory messageGroupFactory)
messageGroupFactory - 使用する MessageGroupFactory。protected MessageGroupFactory getMessageGroupFactory()
public void setBeanName(StringSE name)
BeanNameAware 内の setBeanName protected StringSE getBeanName()
protected RedisTemplate<ObjectSE,Message<?>> getRedisTemplate()
public void afterPropertiesSet()
InitializingBean 内の afterPropertiesSet @ManagedAttribute public int messageGroupSize(ObjectSE groupId)
BasicMessageGroupStoreBasicMessageGroupStore 内の messageGroupSize groupId - グループ識別子。public MessageGroup getMessageGroup(ObjectSE groupId)
BasicMessageGroupStoreBasicMessageGroupStore.addMessageToGroup(Object, Message) を使用して保存された、現在 MessageStore にあるすべてのメッセージを返します。BasicMessageGroupStore 内の getMessageGroup groupId - グループ識別子。public MessageGroup addMessageToGroup(ObjectSE groupId, Message<?> message)
BasicMessageGroupStoreBasicMessageGroupStore 内の addMessageToGroup groupId - メッセージを保存するグループ ID。message - メッセージ。public void removeMessageGroup(ObjectSE groupId)
BasicMessageGroupStoreBasicMessageGroupStore 内の removeMessageGroup groupId - 削除するグループの ID。public Message<?> pollMessageFromGroup(ObjectSE groupId)
BasicMessageGroupStoreMessageGroup からのメッセージをポーリングし(実装でサポートされている場合は FIFO スタイルで)、ポーリングされた Message も削除します BasicMessageGroupStore 内の pollMessageFromGroup groupId - グループ識別子。@ManagedAttribute public int getMessageCountForAllMessageGroups()
@ManagedAttribute public int getMessageGroupCount()