ml.shifu.guagua.worker
类 WorkerComputableTimer<MASTER_RESULT extends Bytable,WORKER_RESULT extends Bytable>

java.lang.Object
  继承者 ml.shifu.guagua.worker.BasicWorkerInterceptor<MASTER_RESULT,WORKER_RESULT>
      继承者 ml.shifu.guagua.worker.WorkerComputableTimer<MASTER_RESULT,WORKER_RESULT>
类型参数:
MASTER_RESULT - master result for computation in each iteration.
WORKER_RESULT - worker result for computation in each iteration.
所有已实现的接口:
WorkerInterceptor<MASTER_RESULT,WORKER_RESULT>

public class WorkerComputableTimer<MASTER_RESULT extends Bytable,WORKER_RESULT extends Bytable>
extends BasicWorkerInterceptor<MASTER_RESULT,WORKER_RESULT>

WorkerComputableTimer is used to print execution time for master computation function. Waiting time is not included in this timer.

WorkerComputableTimer should be set as user interceptor, not system interceptor.


构造方法摘要
WorkerComputableTimer()
           
 
方法摘要
 void postApplication(WorkerContext<MASTER_RESULT,WORKER_RESULT> context)
          The hook point after any computation logic.
 void postIteration(WorkerContext<MASTER_RESULT,WORKER_RESULT> context)
          The hook point after computation of each iteration.
 void preApplication(WorkerContext<MASTER_RESULT,WORKER_RESULT> context)
          The hook point before any computation logic.
 void preIteration(WorkerContext<MASTER_RESULT,WORKER_RESULT> context)
          The hook point before computation of each iteration.
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

WorkerComputableTimer

public WorkerComputableTimer()
方法详细信息

preApplication

public void preApplication(WorkerContext<MASTER_RESULT,WORKER_RESULT> context)
从接口 WorkerInterceptor 复制的描述
The hook point before any computation logic.

指定者:
接口 WorkerInterceptor<MASTER_RESULT extends Bytable,WORKER_RESULT extends Bytable> 中的 preApplication
覆盖:
BasicWorkerInterceptor<MASTER_RESULT extends Bytable,WORKER_RESULT extends Bytable> 中的 preApplication
参数:
context - the worker context instance which includes master result and other useful parameters.

preIteration

public void preIteration(WorkerContext<MASTER_RESULT,WORKER_RESULT> context)
从接口 WorkerInterceptor 复制的描述
The hook point before computation of each iteration.

指定者:
接口 WorkerInterceptor<MASTER_RESULT extends Bytable,WORKER_RESULT extends Bytable> 中的 preIteration
覆盖:
BasicWorkerInterceptor<MASTER_RESULT extends Bytable,WORKER_RESULT extends Bytable> 中的 preIteration
参数:
context - the worker context instance which includes master result and other useful parameters.

postIteration

public void postIteration(WorkerContext<MASTER_RESULT,WORKER_RESULT> context)
从接口 WorkerInterceptor 复制的描述
The hook point after computation of each iteration.

指定者:
接口 WorkerInterceptor<MASTER_RESULT extends Bytable,WORKER_RESULT extends Bytable> 中的 postIteration
覆盖:
BasicWorkerInterceptor<MASTER_RESULT extends Bytable,WORKER_RESULT extends Bytable> 中的 postIteration
参数:
context - the worker context instance which includes master result and other useful parameters.

postApplication

public void postApplication(WorkerContext<MASTER_RESULT,WORKER_RESULT> context)
从接口 WorkerInterceptor 复制的描述
The hook point after any computation logic.

指定者:
接口 WorkerInterceptor<MASTER_RESULT extends Bytable,WORKER_RESULT extends Bytable> 中的 postApplication
覆盖:
BasicWorkerInterceptor<MASTER_RESULT extends Bytable,WORKER_RESULT extends Bytable> 中的 postApplication
参数:
context - the worker context instance which includes master result and other useful parameters.


Copyright © 2014. All Rights Reserved.