クラス 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) 方法の概要
修飾子と型メソッド説明voidboundListOperationsで指定された Redis キューをクリアします。protected voiddoStart()デフォルトでは何もしません。protected voiddoStop()デフォルトでは何もしません。protected voiddoStop(RunnableSE callback) コンポーネントを停止し、コールバックを呼び出します。longboundListOperationsで指定されたキューのサイズを返します。booleanprotected voidonInit()サブクラスは、初期化ロジック用にこれを実装できます。voidsetApplicationEventPublisher(ApplicationEventPublisher applicationEventPublisher) voidsetBeanClassLoader(ClassLoaderSE beanClassLoader) voidsetExpectMessage(boolean expectMessage) データが Redis キューから取得されるとき、返されるデータはメッセージのペイロードのみを表しますか、それともデータは直列化されたMessageを表しますか?voidsetReceiveTimeout(long receiveTimeout) このタイムアウト(ミリ秒)は、boundListOperationsで指定されたキューから要素を取得するときに使用されます。voidsetRecoveryInterval(long recoveryInterval) voidsetRightPop(boolean rightPop) Redis リストからのPOP操作をBRPOPまたはBLPOPにするかどうかを指定します。voidsetSerializer(RedisSerializer<?> serializer) voidsetTaskExecutor(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インターフェース org.springframework.context.SmartLifecycle から継承されたメソッド
isPauseable
フィールドの詳細
DEFAULT_RECEIVE_TIMEOUT
public static final long DEFAULT_RECEIVE_TIMEOUT- 関連事項:
DEFAULT_RECOVERY_INTERVAL
public static final long DEFAULT_RECOVERY_INTERVAL- 関連事項:
コンストラクターの詳細
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
- 次で指定:
- インターフェース
NamedComponentのgetComponentType - オーバーライド:
- クラス
MessageProducerSupportの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 キューをクリアします。