P
- the type of task parameterpublic abstract class MasterBenchTaskResultBase<P extends MasterBenchBaseParameters> extends Object implements TaskResult
TaskResult.Aggregator<T extends TaskResult>
Modifier and Type | Field and Description |
---|---|
protected BaseParameters |
mBaseParameters |
protected long |
mDurationMs |
protected long |
mEndMs |
protected List<String> |
mErrors |
protected P |
mParameters |
protected long |
mRecordStartMs |
CLASS_NAME_FIELD
Constructor and Description |
---|
MasterBenchTaskResultBase()
Creates an instance.
|
Modifier and Type | Method and Description |
---|---|
void |
addErrorMessage(String errMesssage) |
void |
aggregateByWorker(MasterBenchTaskResultBase<P> result)
Merges (updates) a task result with this result except the error information.
|
BaseParameters |
getBaseParameters() |
long |
getDurationMs() |
long |
getEndMs() |
List<String> |
getErrors() |
P |
getParameters() |
long |
getRecordStartMs() |
void |
merge(MasterBenchTaskResultBase<P> result)
Merges (updates) a task result with this result.
|
abstract void |
putStatisticsForMethod(String method,
MasterBenchTaskResultStatistics statistics) |
void |
setBaseParameters(BaseParameters baseParameters) |
void |
setDurationMs(long durationMs) |
void |
setEndMs(long endMs) |
void |
setErrors(List<String> errors) |
void |
setParameters(P parameters) |
void |
setRecordStartMs(long recordStartMs) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
aggregator
fromJson, fromJson, getClassName, setClassName, toJson
protected long mRecordStartMs
protected long mEndMs
protected long mDurationMs
protected BaseParameters mBaseParameters
protected P extends MasterBenchBaseParameters mParameters
public MasterBenchTaskResultBase()
public void merge(MasterBenchTaskResultBase<P> result) throws Exception
result
- the task result to mergeException
public abstract void putStatisticsForMethod(String method, MasterBenchTaskResultStatistics statistics)
method
- the name of the method to insert statistics forstatistics
- the statistics for the methodpublic void aggregateByWorker(MasterBenchTaskResultBase<P> result) throws Exception
result
- the task result to mergeException
public long getDurationMs()
public void setDurationMs(long durationMs)
durationMs
- the duration (in ms)public BaseParameters getBaseParameters()
getBaseParameters
in interface TaskResult
public void setBaseParameters(BaseParameters baseParameters)
baseParameters
- the base parameterspublic P getParameters()
public void setParameters(P parameters)
parameters
- the parameterspublic long getRecordStartMs()
public void setRecordStartMs(long recordStartMs)
recordStartMs
- the start time (in ms)public long getEndMs()
public void setEndMs(long endMs)
endMs
- the end time (in ms)public List<String> getErrors()
getErrors
in interface TaskResult
public void addErrorMessage(String errMesssage)
errMesssage
- the error message to addCopyright © 2023. All Rights Reserved.