クラス 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 に関連付けてメッセージを保存します。voidprotected StringSEintgetMessageGroup(ObjectSE groupId) このグループ ID でBasicMessageGroupStore.addMessageToGroup(Object, Message)を使用して保存された、現在 MessageStore にあるすべてのメッセージを返します。intprotected MessageGroupFactoryprotected RedisTemplate<ObjectSE, Message<?>> intmessageGroupSize(ObjectSE groupId) この MessageGroup のサイズを返します。@Nullable Message<?> pollMessageFromGroup(ObjectSE groupId) このMessageGroupからのメッセージのポーリング(実装でサポートされている場合は FIFO スタイル)と同時に、ポーリングされたMessageも削除します。voidremoveMessageGroup(ObjectSE groupId) この ID のメッセージグループを削除します。voidsetBeanClassLoader(ClassLoaderSE classLoader) voidsetBeanName(StringSE name) voidsetMessageGroupFactory(MessageGroupFactory messageGroupFactory) MessageGroupFactoryを指定して、必要な場所にMessageGroupオブジェクトを作成します。voidsetValueSerializer(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