public class RetryableCommandExecutor extends java.lang.Object implements CommandExecutor
| Modifier and Type | Field and Description |
|---|---|
protected int |
maxAttempts |
protected java.time.Duration |
maxTotalRetriesDuration |
protected ConnectionProvider |
provider |
| Constructor and Description |
|---|
RetryableCommandExecutor(ConnectionProvider provider,
int maxAttempts,
java.time.Duration maxTotalRetriesDuration) |
| Modifier and Type | Method and Description |
|---|---|
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) |
protected void |
sleep(long sleepMillis)
WARNING: This method is accessible for the purpose of testing.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitbroadcastCommandprotected final ConnectionProvider provider
protected final int maxAttempts
protected final java.time.Duration maxTotalRetriesDuration
public RetryableCommandExecutor(ConnectionProvider provider, int maxAttempts, java.time.Duration maxTotalRetriesDuration)
public void close()
close in interface java.lang.AutoCloseablepublic final <T> T executeCommand(CommandObject<T> commandObject)
executeCommand in interface CommandExecutor@VisibleForTesting protected <T> T execute(Connection connection, CommandObject<T> commandObject)
@VisibleForTesting protected void sleep(long sleepMillis)
Copyright © 2025. All rights reserved.