public class ConcurrentScheduledMeasureRunner extends ConcurrentMeasureRunner
ConcurrentMeasureRunner,在多线程并发情况下的运行指定的持续时间的测量运行器.| 限定符和类型 | 字段和说明 |
|---|---|
protected Future<?> |
scheduledFuture
执行中的测量任务的
Future 实例. |
runningFuturescanceled, completed, eachMeasures, endNanoTime, executorService, failure, startNanoTime, success| 构造器和说明 |
|---|
ConcurrentScheduledMeasureRunner()
构造方法.
|
| 限定符和类型 | 方法和说明 |
|---|---|
MeasureResult |
run(Options options,
Runnable runnable)
持续并发的执行指定时间的 runnable 方法,并将执行成功与否、耗时结果等信息存入到 OverallResult 实体对象中.
|
void |
stop()
停止相关的运行测量任务.
|
loopMeasuregetCosts, getFailure, getMeasureResult, getSuccess, getTotal, isCancelled, isCompleted, setEndNanoTimeIfEmptyclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetEndNanoTime, getStartNanoTimepublic ConcurrentScheduledMeasureRunner()
这个类中的属性,需要支持高并发写入.
public MeasureResult run(Options options, Runnable runnable)
run 在接口中 MeasureRunnerrun 在类中 ConcurrentMeasureRunneroptions - 运行的配置选项实例runnable - 可运行实例public void stop()
stop 在接口中 MeasureRunnerstop 在类中 ConcurrentMeasureRunnerCopyright © 2020. All rights reserved.