public class ClusterCommandExecutor extends java.lang.Object implements CommandExecutor
| Modifier and Type | Field and Description |
|---|---|
protected CommandFlagsRegistry |
flags |
protected int |
maxAttempts |
protected java.time.Duration |
maxTotalRetriesDuration |
ClusterConnectionProvider |
provider |
| Constructor and Description |
|---|
ClusterCommandExecutor(ClusterConnectionProvider provider,
int maxAttempts,
java.time.Duration maxTotalRetriesDuration)
Deprecated.
use
ClusterCommandExecutor(ClusterConnectionProvider, int, Duration, CommandFlagsRegistry)
instead. This constructor will be removed in the next major version. |
ClusterCommandExecutor(ClusterConnectionProvider provider,
int maxAttempts,
java.time.Duration maxTotalRetriesDuration,
CommandFlagsRegistry flags) |
| Modifier and Type | Method and Description |
|---|---|
<T> T |
broadcastCommand(CommandObject<T> commandObject) |
void |
close() |
protected <T> T |
execute(Connection connection,
CommandObject<T> commandObject)
WARNING: This method is accessible for the purpose of testing.
|
<T> T |
executeCommand(CommandObject<T> commandObject) |
<T> T |
executeCommandToReplica(CommandObject<T> commandObject) |
protected void |
sleep(long sleepMillis)
WARNING: This method is accessible for the purpose of testing.
|
public final ClusterConnectionProvider provider
protected final int maxAttempts
protected final java.time.Duration maxTotalRetriesDuration
protected final CommandFlagsRegistry flags
@Deprecated public ClusterCommandExecutor(ClusterConnectionProvider provider, int maxAttempts, java.time.Duration maxTotalRetriesDuration)
ClusterCommandExecutor(ClusterConnectionProvider, int, Duration, CommandFlagsRegistry)
instead. This constructor will be removed in the next major version.public ClusterCommandExecutor(ClusterConnectionProvider provider, int maxAttempts, java.time.Duration maxTotalRetriesDuration, CommandFlagsRegistry flags)
public void close()
close in interface java.lang.AutoCloseablepublic final <T> T broadcastCommand(CommandObject<T> commandObject)
broadcastCommand in interface CommandExecutorpublic final <T> T executeCommand(CommandObject<T> commandObject)
executeCommand in interface CommandExecutorpublic final <T> T executeCommandToReplica(CommandObject<T> commandObject)
@VisibleForTesting protected <T> T execute(Connection connection, CommandObject<T> commandObject)
@VisibleForTesting protected void sleep(long sleepMillis)
Copyright © 2025. All rights reserved.