クラス RedisChannelMessageStore
java.lang.ObjectSE
org.springframework.integration.redis.store.RedisChannelMessageStore
- 実装されたすべてのインターフェース:
Aware
、BeanClassLoaderAware
、BeanNameAware
、InitializingBean
、BasicMessageGroupStore
、ChannelMessageStore
- 既知の直属サブクラス
RedisChannelPriorityMessageStore
public class RedisChannelMessageStore
extends ObjectSE
implements ChannelMessageStore, BeanNameAware, InitializingBean, BeanClassLoaderAware
リストを使用して QueueChannel をバックアップする特殊な Redis
ChannelMessageStore
。 キーの一部として使用される setBeanName(String)
が必要です。
- 導入:
- 4.0
- 作成者:
- Gary Russell, Artem Bilan
コンストラクターのサマリー
コンストラクターコンストラクター説明RedisChannelMessageStore
(RedisConnectionFactory connectionFactory) メッセージに Java 直列化を使用するメッセージストアを構築します。メソッドのサマリー
修飾子と型メソッド説明addMessageToGroup
(ObjectSE groupId, Message<?> message) グループ ID に関連付けてメッセージを保存します。void
protected StringSE
int
getMessageGroup
(ObjectSE groupId) このグループ ID でBasicMessageGroupStore.addMessageToGroup(Object, Message)
を使用して保存された、現在 MessageStore にあるすべてのメッセージを返します。int
protected MessageGroupFactory
protected RedisTemplate<ObjectSE,
Message<?>> int
messageGroupSize
(ObjectSE groupId) この MessageGroup のサイズを返します。Message<?>
pollMessageFromGroup
(ObjectSE groupId) このMessageGroup
からのメッセージのポーリング(実装でサポートされている場合は FIFO スタイル)と同時に、ポーリングされたMessage
も削除します。void
removeMessageGroup
(ObjectSE groupId) この ID のメッセージグループを削除します。void
setBeanClassLoader
(ClassLoaderSE classLoader) void
setBeanName
(StringSE name) void
setMessageGroupFactory
(MessageGroupFactory messageGroupFactory) MessageGroupFactory
を指定して、必要な場所にMessageGroup
オブジェクトを作成します。void
setValueSerializer
(RedisSerializer<?> valueSerializer) 別のシリアライザーを使用します(Message
のデフォルトはJdkSerializationRedisSerializer
です。
コンストラクターの詳細
RedisChannelMessageStore
メッセージに Java 直列化を使用するメッセージストアを構築します。- パラメーター:
connectionFactory
- redis 接続ファクトリ。
メソッドの詳細
setBeanClassLoader
- 次で指定:
- インターフェース
BeanClassLoaderAware
のsetBeanClassLoader
setValueSerializer
別のシリアライザーを使用します(Message
のデフォルトはJdkSerializationRedisSerializer
です。- パラメーター:
valueSerializer
- 値シリアライザー。
setMessageGroupFactory
- パラメーター:
messageGroupFactory
- 使用するMessageGroupFactory
。- 導入:
- 4.3
getMessageGroupFactory
setBeanName
- 次で指定:
- インターフェース
BeanNameAware
のsetBeanName
getBeanName
getRedisTemplate
afterPropertiesSet
public void afterPropertiesSet()- 次で指定:
- インターフェース
InitializingBean
のafterPropertiesSet
messageGroupSize
インターフェースからコピーされた説明:BasicMessageGroupStore
この MessageGroup のサイズを返します。- 次で指定:
- インターフェース
BasicMessageGroupStore
のmessageGroupSize
- パラメーター:
groupId
- グループ識別子。- 戻り値:
- サイズ。
getMessageGroup
インターフェースからコピーされた説明:BasicMessageGroupStore
このグループ ID でBasicMessageGroupStore.addMessageToGroup(Object, Message)
を使用して保存された、現在 MessageStore にあるすべてのメッセージを返します。- 次で指定:
- インターフェース
BasicMessageGroupStore
のgetMessageGroup
- パラメーター:
groupId
- グループ識別子。- 戻り値:
- メッセージのグループ。このキーにメッセージが存在しない場合は空です。
addMessageToGroup
インターフェースからコピーされた説明:BasicMessageGroupStore
グループ ID に関連付けてメッセージを保存します。これは、メッセージをグループ化するために使用できます。- 次で指定:
- インターフェース
BasicMessageGroupStore
のaddMessageToGroup
- パラメーター:
groupId
- メッセージを保存するグループ ID。message
- メッセージ。- 戻り値:
- メッセージグループ。
removeMessageGroup
インターフェースからコピーされた説明:BasicMessageGroupStore
この ID のメッセージグループを削除します。- 次で指定:
- インターフェース
BasicMessageGroupStore
のremoveMessageGroup
- パラメーター:
groupId
- 削除するグループの ID。
pollMessageFromGroup
インターフェースからコピーされた説明:BasicMessageGroupStore
このMessageGroup
からのメッセージのポーリング(実装でサポートされている場合は FIFO スタイル)と同時に、ポーリングされたMessage
も削除します。- 次で指定:
- インターフェース
BasicMessageGroupStore
のpollMessageFromGroup
- パラメーター:
groupId
- グループ識別子。- 戻り値:
- メッセージ。
getMessageCountForAllMessageGroups
getMessageGroupCount