クラス ClusterCommandExecutor
java.lang.ObjectSE
org.springframework.data.redis.connection.ClusterCommandExecutor
- 実装されたすべてのインターフェース:
DisposableBean
ClusterCommandExecutor
は、既知のクラスターノード全体でコマンドを実行します。AsyncTaskExecutor
を提供することで、実行動作を構成できます。- 導入:
- 1.7
- 作成者:
- Christoph Strobl, Mark Paluch, John Blum
ネストされたクラスのサマリー
ネストされたクラス修飾子と型クラス説明static interface
クラスタクライアントを直接使用する Redis「低レベル」コードのコールバックインターフェース。static interface
クラスタクライアントを使用してマルチキーコマンドを実行する Redis「低レベル」コードのコールバックインターフェース。static class
ClusterCommandExecutor.MultiNodeResult
は、複数のRedisClusterNode
で実行されたコマンドのすべてのClusterCommandExecutor.NodeResult
を保持します。static class
ClusterCommandExecutor.NodeResult
は、指定されたRedisClusterNode
上のClusterCommandExecutor.ClusterCommandCallback
によって返される実際のvalue
をカプセル化します。コンストラクターの概要
コンストラクターコンストラクター説明ClusterCommandExecutor
(ClusterTopologyProvider topologyProvider, ClusterNodeResourceProvider resourceProvider, ExceptionTranslationStrategy exceptionTranslation) 新しいClusterCommandExecutor
を作成します。ClusterCommandExecutor
(ClusterTopologyProvider topologyProvider, ClusterNodeResourceProvider resourceProvider, ExceptionTranslationStrategy exceptionTranslation, AsyncTaskExecutor executor) メソッドのサマリー
修飾子と型メソッド説明void
destroy()
<S,
T> ClusterCommandExecutor.MultiNodeResult<T> executeCommandAsyncOnNodes
(ClusterCommandExecutor.ClusterCommandCallback<S, T> commandCallback, IterableSE<RedisClusterNode> nodes) <S,
T> ClusterCommandExecutor.MultiNodeResult<T> executeCommandOnAllNodes
(ClusterCommandExecutor.ClusterCommandCallback<S, T> commandCallback) 到達可能なすべてのマスターノードでClusterCommandExecutor.ClusterCommandCallback
を実行します。executeCommandOnArbitraryNode
(ClusterCommandExecutor.ClusterCommandCallback<?, T> commandCallback) ランダムノードでClusterCommandExecutor.ClusterCommandCallback
を実行します。<S,
T> ClusterCommandExecutor.NodeResult<T> executeCommandOnSingleNode
(ClusterCommandExecutor.ClusterCommandCallback<S, T> commandCallback, RedisClusterNode node) 指定されたRedisClusterNode
でClusterCommandExecutor.ClusterCommandCallback
を実行します。<S,
T> ClusterCommandExecutor.MultiNodeResult<T> executeMultiKeyCommand
(ClusterCommandExecutor.MultiKeyClusterCommandCallback<S, T> commandCallback, IterableSE<byte[]> keys) 1 つ以上のキーを提供するノードのキュレートされたセットでClusterCommandExecutor.MultiKeyClusterCommandCallback
を実行します。void
setMaxRedirects
(int maxRedirects) MOVED
またはASK
でフォローするリダイレクトの最大数を設定します。
コンストラクターの詳細
ClusterCommandExecutor
public ClusterCommandExecutor(ClusterTopologyProvider topologyProvider, ClusterNodeResourceProvider resourceProvider, ExceptionTranslationStrategy exceptionTranslation) 新しいClusterCommandExecutor
を作成します。- パラメーター:
topologyProvider
- null であってはなりません。resourceProvider
- null であってはなりません。exceptionTranslation
- null であってはなりません。
ClusterCommandExecutor
public ClusterCommandExecutor(ClusterTopologyProvider topologyProvider, ClusterNodeResourceProvider resourceProvider, ExceptionTranslationStrategy exceptionTranslation, @Nullable AsyncTaskExecutor executor) - パラメーター:
topologyProvider
- null であってはなりません。resourceProvider
- null であってはなりません。exceptionTranslation
- null であってはなりません。executor
- タスク実行プログラムを null に設定します。null の場合、デフォルトはSimpleAsyncTaskExecutor
になります。
メソッドの詳細
executeCommandOnArbitraryNode
public <T> ClusterCommandExecutor.NodeResult<T> executeCommandOnArbitraryNode(ClusterCommandExecutor.ClusterCommandCallback<?, T> commandCallback) ランダムノードでClusterCommandExecutor.ClusterCommandCallback
を実行します。- パラメーター:
commandCallback
- null であってはなりません。- 戻り値:
- 決して null にはなりません。
executeCommandOnSingleNode
public <S,T> ClusterCommandExecutor.NodeResult<T> executeCommandOnSingleNode(ClusterCommandExecutor.ClusterCommandCallback<S, T> commandCallback, RedisClusterNode node) 指定されたRedisClusterNode
でClusterCommandExecutor.ClusterCommandCallback
を実行します。- パラメーター:
commandCallback
- null であってはなりません。node
- null であってはなりません。- 戻り値:
- 単一のターゲット
RedisClusterNode
からのClusterCommandExecutor.NodeResult
。 - 例外:
IllegalArgumentExceptionSE
- 特定のノードのリソースを取得できない場合。
executeCommandOnAllNodes
public <S,T> ClusterCommandExecutor.MultiNodeResult<T> executeCommandOnAllNodes(ClusterCommandExecutor.ClusterCommandCallback<S, T> commandCallback) 到達可能なすべてのマスターノードでClusterCommandExecutor.ClusterCommandCallback
を実行します。- パラメーター:
commandCallback
- null であってはなりません。- 戻り値:
- 決して null にはなりません。
- 例外:
ClusterCommandExecutionFailureException
- 指定されたnode
で指定されたcommand
を実行中に障害が発生した場合。
executeCommandAsyncOnNodes
public <S,T> ClusterCommandExecutor.MultiNodeResult<T> executeCommandAsyncOnNodes(ClusterCommandExecutor.ClusterCommandCallback<S, T> commandCallback, IterableSE<RedisClusterNode> nodes) - パラメーター:
commandCallback
- null であってはなりません。nodes
- null であってはなりません。- 戻り値:
- 決して null にはなりません。
- 例外:
ClusterCommandExecutionFailureException
- 指定されたnode
で指定されたcommand
を実行中に障害が発生した場合。IllegalArgumentExceptionSE
- ノードをトポロジ既知のノードに解決できなかった場合
executeMultiKeyCommand
public <S,T> ClusterCommandExecutor.MultiNodeResult<T> executeMultiKeyCommand(ClusterCommandExecutor.MultiKeyClusterCommandCallback<S, T> commandCallback, IterableSE<byte[]> keys) 1 つ以上のキーを提供するノードのキュレートされたセットでClusterCommandExecutor.MultiKeyClusterCommandCallback
を実行します。- パラメーター:
commandCallback
- null であってはなりません。- 戻り値:
- 決して null にはなりません。
- 例外:
ClusterCommandExecutionFailureException
- 指定されたcommand
の実行中に障害が発生した場合。
setMaxRedirects
public void setMaxRedirects(int maxRedirects) MOVED
またはASK
でフォローするリダイレクトの最大数を設定します。- パラメーター:
maxRedirects
- リダイレクトを一時停止するには、ゼロに設定します。
destroy
- 次で指定:
- インターフェース
DisposableBean
のdestroy
- 例外:
ExceptionSE