クラス RedisQueueMessageDrivenEndpoint
java.lang.ObjectSE
org.springframework.integration.context.IntegrationObjectSupport
org.springframework.integration.endpoint.AbstractEndpoint
org.springframework.integration.endpoint.MessageProducerSupport
org.springframework.integration.redis.inbound.RedisQueueMessageDrivenEndpoint
- 実装されたすべてのインターフェース:
Aware
、BeanClassLoaderAware
、BeanFactoryAware
、BeanNameAware
、DisposableBean
、InitializingBean
、SmartInitializingSingleton
、ApplicationContextAware
、ApplicationEventPublisherAware
、Lifecycle
、Phased
、SmartLifecycle
、ComponentSourceAware
、ExpressionCapable
、MessageProducer
、IntegrationPattern
、NamedComponent
、IntegrationInboundManagement
、IntegrationManagement
、ManageableLifecycle
、ManageableSmartLifecycle
、TrackableComponent
@ManagedResource
@IntegrationManagedResource
public class RedisQueueMessageDrivenEndpoint
extends MessageProducerSupport
implements ApplicationEventPublisherAware, BeanClassLoaderAware
- 導入:
- 3.0
- 作成者:
- Mark Fisher, Gunnar Hillert, Artem Bilan, Gary Russell, Rainer Frey, Matthias Jeschke
ネストされたクラスのサマリー
インターフェース org.springframework.integration.support.management.IntegrationManagement から継承されたネストクラス / インターフェース
IntegrationManagement.ManagementOverrides
フィールドのサマリー
フィールドクラス org.springframework.integration.endpoint.AbstractEndpoint から継承されたフィールド
lifecycleLock
クラス org.springframework.integration.context.IntegrationObjectSupport から継承されたフィールド
EXPRESSION_PARSER, logger
インターフェース org.springframework.integration.support.management.IntegrationManagement から継承されたフィールド
METER_PREFIX, RECEIVE_COUNTER_NAME, SEND_TIMER_NAME
インターフェース org.springframework.context.SmartLifecycle から継承されたフィールド
DEFAULT_PHASE
コンストラクターの概要
コンストラクターコンストラクター説明RedisQueueMessageDrivenEndpoint
(StringSE queueName, RedisConnectionFactory connectionFactory) メソッドのサマリー
修飾子と型メソッド説明void
boundListOperations
で指定された Redis キューをクリアします。protected void
doStart()
デフォルトでは何もしません。protected void
doStop()
デフォルトでは何もしません。protected void
doStop
(RunnableSE callback) コンポーネントを停止し、コールバックを呼び出します。サブクラスはこのメソッドを実装して、コンポーネント型情報を提供できます。long
boundListOperations
で指定されたキューのサイズを返します。boolean
protected void
onInit()
サブクラスは、初期化ロジック用にこれを実装できます。void
setApplicationEventPublisher
(ApplicationEventPublisher applicationEventPublisher) void
setBeanClassLoader
(ClassLoaderSE beanClassLoader) void
setExpectMessage
(boolean expectMessage) データが Redis キューから取得されるとき、返されるデータはメッセージのペイロードのみを表しますか、それともデータは直列化されたMessage
を表しますか?void
setReceiveTimeout
(long receiveTimeout) このタイムアウト(ミリ秒)は、boundListOperations
で指定されたキューから要素を取得するときに使用されます。void
setRecoveryInterval
(long recoveryInterval) void
setRightPop
(boolean rightPop) Redis リストからのPOP
操作をBRPOP
またはBLPOP
にするかどうかを指定します。void
setSerializer
(RedisSerializer<?> serializer) void
setTaskExecutor
(ExecutorSE taskExecutor) クラス org.springframework.integration.endpoint.MessageProducerSupport から継承されたメソッド
afterSingletonsInstantiated, buildErrorMessage, getErrorChannel, getErrorMessageAttributes, getErrorMessageStrategy, getIntegrationPatternType, getMessagingTemplate, getOutputChannel, getRequiredOutputChannel, isObserved, registerObservationRegistry, sendErrorMessageIfNecessary, sendMessage, setErrorChannel, setErrorChannelName, setErrorMessageStrategy, setObservationConvention, setOutputChannel, setOutputChannelName, setSendTimeout, setShouldTrack, subscribeToPublisher
クラス org.springframework.integration.endpoint.AbstractEndpoint から継承されたメソッド
destroy, getPhase, getRole, isActive, isAutoStartup, isRunning, setAutoStartup, setPhase, setRole, start, stop, stop
クラス org.springframework.integration.context.IntegrationObjectSupport から継承されたメソッド
afterPropertiesSet, extractTypeIfPossible, generateId, getApplicationContext, getApplicationContextId, getBeanDescription, getBeanFactory, getBeanName, getChannelResolver, getComponentDescription, getComponentName, getComponentSource, getConversionService, getExpression, getIntegrationProperties, getMessageBuilderFactory, getTaskScheduler, isInitialized, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentDescription, setComponentName, setComponentSource, setConversionService, setMessageBuilderFactory, setPrimaryExpression, setTaskScheduler, toString
クラス java.lang.ObjectSE から継承されたメソッド
clone, equalsSE, finalize, getClass, hashCode, notify, notifyAll, wait, waitSE, waitSE
インターフェース org.springframework.integration.support.management.IntegrationManagement から継承されたメソッド
destroy, getManagedName, getManagedType, getOverrides, getThisAs, isLoggingEnabled, registerMetricsCaptor, setLoggingEnabled, setManagedName, setManagedType
インターフェース org.springframework.integration.support.context.NamedComponent から継承されたメソッド
getBeanName, getComponentName
フィールドの詳細
コンストラクターの詳細
RedisQueueMessageDrivenEndpoint
public RedisQueueMessageDrivenEndpoint(StringSE queueName, RedisConnectionFactory connectionFactory) - パラメーター:
queueName
- 空の文字列であってはなりませんconnectionFactory
- null であってはなりません
メソッドの詳細
setApplicationEventPublisher
- 次で指定:
- インターフェース
ApplicationEventPublisherAware
のsetApplicationEventPublisher
setBeanClassLoader
- 次で指定:
- インターフェース
BeanClassLoaderAware
のsetBeanClassLoader
setSerializer
setExpectMessage
public void setExpectMessage(boolean expectMessage) データが Redis キューから取得されるとき、返されるデータはメッセージのペイロードのみを表しますか、それともデータは直列化されたMessage
を表しますか?expectMessage
のデフォルトは false です。これは、取得したデータが新しい Spring Integration メッセージのペイロードとして使用されることを意味します。それ以外の場合、データは Spring Integration メッセージとして逆直列化されます。- パラメーター:
expectMessage
- デフォルトは false です
setReceiveTimeout
public void setReceiveTimeout(long receiveTimeout) このタイムアウト(ミリ秒)は、boundListOperations
で指定されたキューから要素を取得するときに使用されます。キューに要素が含まれている場合、データはすぐに取得されます。ただし、キューが空の場合、要素をキューから取得できるか、指定されたタイムアウトが経過するまで、Redis 接続はブロックされます。
ゼロのタイムアウトは、無期限にブロックするために使用できます。明示的に設定されていない場合、タイムアウト値はデフォルトで
1000
になります関連事項: https://redis.io/commands/brpop
- パラメーター:
receiveTimeout
- 負でない必要があります。ミリ秒で指定されます。
setTaskExecutor
setRecoveryInterval
public void setRecoveryInterval(long recoveryInterval) setRightPop
public void setRightPop(boolean rightPop) Redis リストからのPOP
操作をBRPOP
またはBLPOP
にするかどうかを指定します。- パラメーター:
rightPop
-BRPOP
フラグ。デフォルトはtrue
です。- 導入:
- 4.3
onInit
protected void onInit()クラスからコピーされた説明:IntegrationObjectSupport
サブクラスは、初期化ロジック用にこれを実装できます。- オーバーライド:
- クラス
MessageProducerSupport
のonInit
getComponentType
クラスからコピーされた説明:IntegrationObjectSupport
サブクラスはこのメソッドを実装して、コンポーネント型情報を提供できます。- 次で指定:
- インターフェース
NamedComponent
のgetComponentType
- オーバーライド:
- クラス
IntegrationObjectSupport
のgetComponentType
doStart
protected void doStart()クラスからコピーされた説明:MessageProducerSupport
デフォルトでは何も実行されません。ライフサイクル管理された動作が必要な場合、サブクラスはこれをオーバーライドできます。'lifecycleLock' によって保護されています。- オーバーライド:
- クラス
MessageProducerSupport
のdoStart
doStop
クラスからコピーされた説明:AbstractEndpoint
コンポーネントを停止し、コールバックを呼び出します。- オーバーライド:
- クラス
AbstractEndpoint
のdoStop
- パラメーター:
callback
- 起動する Runnable。
doStop
protected void doStop()クラスからコピーされた説明:MessageProducerSupport
デフォルトでは何もしません。サブクラスは、ライフサイクル管理の動作が必要な場合、これをオーバーライドできます。- オーバーライド:
- クラス
MessageProducerSupport
のdoStop
isListening
public boolean isListening()getQueueSize
boundListOperations
で指定されたキューのサイズを返します。キューは Redis リストで表されます。キューが存在しない場合は、0
が返されます。https://redis.io/commands/llen も参照してください- 戻り値:
- キューのサイズ。決して否定的ではありません。
clearQueue
boundListOperations
で指定された Redis キューをクリアします。