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>

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.


构造方法摘要
BasicCoordinator.RetryCoordinatorCommand(boolean isFixedTime, long sleepUnitTime)
           
 
方法摘要
 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()
           
 
从类 ml.shifu.guagua.BasicCoordinator.BasicCoordinatorCommand 继承的方法
execute
 
从类 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 Exception,
                      InterruptedException
从类 BasicCoordinator.BasicCoordinatorCommand 复制的描述
Real method to do coordinator operation.

指定者:
BasicCoordinator.BasicCoordinatorCommand 中的 doExecute
抛出:
Exception
InterruptedException

retryExecution

public abstract boolean retryExecution()
                                throws Exception,
                                       InterruptedException
抛出:
Exception
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 © 2015. All Rights Reserved.