クラス RedisQueueInboundGateway
java.lang.ObjectSE
org.springframework.integration.context.IntegrationObjectSupport
org.springframework.integration.endpoint.AbstractEndpoint
org.springframework.integration.gateway.MessagingGatewaySupport
org.springframework.integration.redis.inbound.RedisQueueInboundGateway
- 実装されたすべてのインターフェース:
Aware
、BeanClassLoaderAware
、BeanFactoryAware
、BeanNameAware
、DisposableBean
、InitializingBean
、ApplicationContextAware
、ApplicationEventPublisherAware
、Lifecycle
、Phased
、SmartLifecycle
、ComponentSourceAware
、ExpressionCapable
、IntegrationPattern
、NamedComponent
、IntegrationInboundManagement
、IntegrationManagement
、ManageableLifecycle
、ManageableSmartLifecycle
、TrackableComponent
@ManagedResource
@IntegrationManagedResource
public class RedisQueueInboundGateway
extends MessagingGatewaySupport
implements ApplicationEventPublisherAware, BeanClassLoaderAware
- 導入:
- 4.1
- 作成者:
- David Liu, Artem Bilan, Gary Russell, Matthias Jeschke
ネストされたクラスのサマリー
クラス org.springframework.integration.gateway.MessagingGatewaySupport から継承されたネストクラス / インターフェース
MessagingGatewaySupport.ConvertingMessagingTemplate
インターフェース org.springframework.integration.support.management.IntegrationManagement から継承されたネストクラス / インターフェース
IntegrationManagement.ManagementOverrides
フィールドのサマリー
フィールドクラス org.springframework.integration.gateway.MessagingGatewaySupport から継承されたフィールド
messagingTemplate
クラス org.springframework.integration.endpoint.AbstractEndpoint から継承されたフィールド
lifecycleCondition, 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
コンストラクターの概要
コンストラクターメソッドのサマリー
修飾子と型メソッド説明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
setExtractPayload
(boolean extractPayload) void
setReceiveTimeout
(long receiveTimeout) このタイムアウト(ミリ秒)は、boundListOperations
で指定されたキューから要素を取得するときに使用されます。void
setRecoveryInterval
(long recoveryInterval) void
setSerializer
(RedisSerializer<?> serializer) void
setTaskExecutor
(ExecutorSE taskExecutor) クラス org.springframework.integration.gateway.MessagingGatewaySupport から継承されたメソッド
buildErrorMessage, buildSendTimer, destroy, getErrorChannel, getErrorMessageAttributes, getErrorMessageStrategy, getIntegrationPatternType, getManagedName, getManagedType, getOverrides, getReplyChannel, getRequestChannel, isLoggingEnabled, isObserved, receive, receive, receiveMessage, receiveMessage, registerMetricsCaptor, registerObservationRegistry, registerReplyMessageCorrelatorIfNecessary, send, sendAndReceive, sendAndReceiveMessage, sendAndReceiveMessageReactive, sendTimer, setErrorChannel, setErrorChannelName, setErrorMessageStrategy, setErrorOnTimeout, setLoggingEnabled, setManagedName, setManagedType, setObservationConvention, setReceiverObservationConvention, setReplyChannel, setReplyChannelName, setReplyMapper, setReplyTimeout, setRequestChannel, setRequestChannelName, setRequestMapper, setRequestTimeout, setShouldTrack
クラス org.springframework.integration.endpoint.AbstractEndpoint から継承されたメソッド
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 から継承されたメソッド
getThisAs
インターフェース org.springframework.integration.support.context.NamedComponent から継承されたメソッド
getBeanName, getComponentName
フィールドの詳細
DEFAULT_RECEIVE_TIMEOUT
public static final long DEFAULT_RECEIVE_TIMEOUT- 関連事項:
DEFAULT_RECOVERY_INTERVAL
public static final long DEFAULT_RECOVERY_INTERVAL- 関連事項:
コンストラクターの詳細
RedisQueueInboundGateway
- パラメーター:
queueName
- 空の文字列であってはなりませんconnectionFactory
- null であってはなりません
メソッドの詳細
setExtractPayload
public void setExtractPayload(boolean extractPayload) setApplicationEventPublisher
- 次で指定:
- インターフェース
ApplicationEventPublisherAware
のsetApplicationEventPublisher
setBeanClassLoader
- 次で指定:
- インターフェース
BeanClassLoaderAware
のsetBeanClassLoader
setSerializer
setReceiveTimeout
public void setReceiveTimeout(long receiveTimeout) このタイムアウト(ミリ秒)は、boundListOperations
で指定されたキューから要素を取得するときに使用されます。キューに要素が含まれている場合、データはすぐに取得されます。ただし、キューが空の場合、要素をキューから取得できるか、指定されたタイムアウトが経過するまで、Redis 接続はブロックされます。
ゼロのタイムアウトは、無期限にブロックするために使用できます。明示的に設定されていない場合、タイムアウト値はデフォルトで
1000
になります関連事項: https://redis.io/commands/brpop
- パラメーター:
receiveTimeout
- 負でない必要があります。ミリ秒で指定されます。
setTaskExecutor
setRecoveryInterval
public void setRecoveryInterval(long recoveryInterval) onInit
protected void onInit()クラスからコピーされた説明:IntegrationObjectSupport
サブクラスは、初期化ロジック用にこれを実装できます。- オーバーライド:
- クラス
MessagingGatewaySupport
のonInit
getComponentType
クラスからコピーされた説明:IntegrationObjectSupport
サブクラスはこのメソッドを実装して、コンポーネント型情報を提供できます。- 次で指定:
- インターフェース
NamedComponent
のgetComponentType
- オーバーライド:
- クラス
MessagingGatewaySupport
のgetComponentType
doStart
protected void doStart()クラスからコピーされた説明:AbstractEndpoint
サブクラスは、開始動作でこのメソッドを実装する必要があります。このメソッドは、AbstractEndpoint.lifecycleLock
を保持しているときに呼び出されます。- オーバーライド:
- クラス
MessagingGatewaySupport
のdoStart
doStop
クラスからコピーされた説明:AbstractEndpoint
コンポーネントを停止し、コールバックを呼び出します。- オーバーライド:
- クラス
AbstractEndpoint
のdoStop
- パラメーター:
callback
- 起動する Runnable。
doStop
protected void doStop()クラスからコピーされた説明:AbstractEndpoint
サブクラスは、停止動作でこのメソッドを実装する必要があります。このメソッドは、AbstractEndpoint.lifecycleLock
を保持しているときに呼び出されます。- オーバーライド:
- クラス
MessagingGatewaySupport
のdoStop
isListening
public boolean isListening()getQueueSize
boundListOperations
で指定されたキューのサイズを返します。キューは Redis リストで表されます。キューが存在しない場合は、0
が返されます。https://redis.io/commands/llen も参照してください- 戻り値:
- キューのサイズ。決して否定的ではありません。
clearQueue
boundListOperations
で指定された Redis キューをクリアします。