public class IOTaskResult extends Object implements TaskResult
Modifier and Type | Class and Description |
---|---|
static class |
IOTaskResult.IOMode
The IO mode, either READ or WRITE.
|
static class |
IOTaskResult.Point
An object representation of a successful I/O operation to the UFS.
|
CLASS_NAME_FIELD
Constructor and Description |
---|
IOTaskResult()
An empty constructor.
|
IOTaskResult(List<IOTaskResult.Point> points,
List<String> errors)
The constructor used for serialization.
|
Modifier and Type | Method and Description |
---|---|
void |
addError(String errorMsg) |
void |
addPoint(IOTaskResult.Point p) |
TaskResult.Aggregator |
aggregator() |
BaseParameters |
getBaseParameters() |
List<String> |
getErrors() |
UfsIOParameters |
getParameters() |
List<IOTaskResult.Point> |
getPoints() |
IOTaskResult |
merge(IOTaskResult anotherResult)
Merge another result into itself.
|
static IOTaskResult |
reduceList(Iterable<IOTaskResult> results)
Reduce a list of
IOTaskResult into one. |
void |
setBaseParameters(BaseParameters baseParameters) |
void |
setErrors(List<String> errors) |
void |
setParameters(UfsIOParameters parameters) |
void |
setPoints(List<IOTaskResult.Point> points) |
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
fromJson, fromJson, getClassName, setClassName, toJson
public IOTaskResult()
public IOTaskResult(List<IOTaskResult.Point> points, List<String> errors)
points
- the pointserrors
- the errorspublic void addPoint(IOTaskResult.Point p)
p
- the point to addpublic List<IOTaskResult.Point> getPoints()
public void addError(String errorMsg)
errorMsg
- an error msg to addpublic List<String> getErrors()
getErrors
in interface TaskResult
public void setPoints(List<IOTaskResult.Point> points)
points
- the pointspublic BaseParameters getBaseParameters()
getBaseParameters
in interface TaskResult
public void setBaseParameters(BaseParameters baseParameters)
baseParameters
- the BaseParameters
to usepublic UfsIOParameters getParameters()
UfsIOParameters
public void setParameters(UfsIOParameters parameters)
parameters
- the UfsIOParameters
to usepublic IOTaskResult merge(IOTaskResult anotherResult)
anotherResult
- another IOTaskResult
public static IOTaskResult reduceList(Iterable<IOTaskResult> results)
IOTaskResult
into one.results
- a list of results to combinepublic TaskResult.Aggregator aggregator()
aggregator
in interface TaskResult
Copyright © 2023. All Rights Reserved.