ml.shifu.guagua
类 BasicCoordinator.RetryCoordinatorCommand
java.lang.Object
ml.shifu.guagua.BasicCoordinator.BasicCoordinatorCommand
ml.shifu.guagua.BasicCoordinator.RetryCoordinatorCommand
- 所有已实现的接口:
- BasicCoordinator.CoordinatorCommand
- 包容类:
- BasicCoordinator<MASTER_RESULT extends Bytable,WORKER_RESULT extends Bytable>
protected 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.
|
方法摘要 |
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()
|
| 从类 java.lang.Object 继承的方法 |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BasicCoordinator.RetryCoordinatorCommand
public BasicCoordinator.RetryCoordinatorCommand(boolean isFixedTime,
long sleepUnitTime)
doExecute
public void doExecute()
throws org.apache.zookeeper.KeeperException,
InterruptedException
- 从类
BasicCoordinator.BasicCoordinatorCommand 复制的描述
- Real method to do coordinator operation.
- 指定者:
- 类
BasicCoordinator.BasicCoordinatorCommand 中的 doExecute
- 抛出:
org.apache.zookeeper.KeeperException
InterruptedException
retryExecution
public abstract boolean retryExecution()
throws org.apache.zookeeper.KeeperException,
InterruptedException
- 抛出:
org.apache.zookeeper.KeeperException
InterruptedException
getElapsedTime
public long getElapsedTime()
isTerminated
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.
Copyright © 2014. All Rights Reserved.