public abstract static class BasicCoordinator.RetryCoordinatorCommand extends BasicCoordinator.BasicCoordinatorCommand
BasicCoordinator.RetryCoordinatorCommand is used to wrap retry logic. retryExecution()
will be retried by a fixed sleeping time or an increasing time.| Constructor and Description |
|---|
RetryCoordinatorCommand(boolean isFixedTime,
long sleepUnitTime) |
| Modifier and Type | Method and Description |
|---|---|
void |
doExecute()
Real method to do coordinator operation.
|
long |
getElapsedTime() |
protected boolean |
isTerminated(int workersCompleted,
int workers,
double minWorkersRatio,
long minWorkersTimeout)
Return true for
retryExecution() if in minWorkersTimeout time get (int) (workers *
minWorkersRatio)) workers completed. |
abstract boolean |
retryExecution() |
executepublic RetryCoordinatorCommand(boolean isFixedTime,
long sleepUnitTime)
public void doExecute()
throws Exception,
InterruptedException
BasicCoordinator.BasicCoordinatorCommanddoExecute in class BasicCoordinator.BasicCoordinatorCommandExceptionInterruptedExceptionpublic abstract boolean retryExecution()
throws Exception,
InterruptedException
ExceptionInterruptedExceptionpublic long getElapsedTime()
protected boolean isTerminated(int workersCompleted,
int workers,
double minWorkersRatio,
long minWorkersTimeout)
retryExecution() if in minWorkersTimeout time get (int) (workers *
minWorkersRatio)) workers completed.Copyright © 2018. All Rights Reserved.