public class TaskResultImpl extends Object implements TaskResult
Constructor and Description |
---|
TaskResultImpl(TaskId id,
TaskResultData d) |
Modifier and Type | Method and Description |
---|---|
FlowAction |
getAction()
If a FlowScript was executed on this task, its result
is stored it so that the action can be performed later when
processed by the core.
|
Throwable |
getException()
Retrieve the exception threw by the task.
|
Map<String,String> |
getMetadata()
Get metadata associated with this result.
|
TaskLogs |
getOutput()
Return the output of the execution, including stdout and stderr.
|
Map<String,byte[]> |
getPropagatedVariables()
Return the content of propagated variables, in byte array format
|
Map<String,Serializable> |
getResultMap()
Returns a map of job results
|
byte[] |
getSerializedValue()
Get the serialized value of the task.
|
TaskId |
getTaskId()
To get the id of the task.
|
Serializable |
getValue()
Get the value of the task.
|
Map<String,Serializable> |
getVariables()
Returns the deserialized version of the propagated variables
|
boolean |
hadException()
To know if an exception has occurred on this task.
|
boolean |
isRaw()
Returns true if this result contains raw data (i.e.
|
void |
setMetadata(Map<String,String> metadata) |
void |
setOutput(TaskLogs taskLogs) |
void |
setValue(Serializable value) |
Serializable |
value()
Get the value of the task.
|
public TaskResultImpl(TaskId id, TaskResultData d)
public FlowAction getAction()
TaskResult
getAction
in interface TaskResult
public Throwable getException()
TaskResult
getException
in interface TaskResult
public void setOutput(TaskLogs taskLogs)
public TaskLogs getOutput()
TaskResult
getOutput
in interface TaskResult
public Map<String,byte[]> getPropagatedVariables()
TaskResult
getPropagatedVariables
in interface TaskResult
public Map<String,Serializable> getVariables() throws IOException, ClassNotFoundException
TaskResult
getVariables
in interface TaskResult
IOException
ClassNotFoundException
public boolean isRaw()
TaskResult
isRaw
in interface TaskResult
public Map<String,Serializable> getResultMap()
TaskResult
getResultMap
in interface TaskResult
public byte[] getSerializedValue()
TaskResult
getSerializedValue
in interface TaskResult
public Map<String,String> getMetadata()
TaskResult
getMetadata
in interface TaskResult
public TaskId getTaskId()
TaskResult
getTaskId
in interface TaskResult
public boolean hadException()
TaskResult
hadException
in interface TaskResult
public void setValue(Serializable value)
public Serializable value() throws Throwable
TaskResult
value
in interface TaskResult
Throwable
- If the value has generate an exception.public Serializable getValue() throws Throwable
TaskResult
getValue
in interface TaskResult
Throwable