T - Type of Node/Task IDR - Type of Node/Task resultpublic abstract class Task<T,R> extends Object implements Serializable
| Constructor and Description |
|---|
Task() |
| Modifier and Type | Method and Description |
|---|---|
abstract R |
execute()
Framework would call this method, when it comes for tasks to be executed.
|
LocalDateTime |
getEndTime() |
T |
getId() |
ExecutionResults<T,R> |
getParentResults() |
protected ExecutionResult<T,R> |
getResult(T id) |
LocalDateTime |
getStartTime() |
Duration |
getTimeout() |
boolean |
isCompleted() |
boolean |
isTimedOut() |
void |
markEnd() |
void |
markStart() |
void |
setConsiderExecutionError(boolean considerExecutionError)
sets whether execution errors should be considered or not?
|
void |
setId(T id)
Sets the new id
|
void |
setNodeProvider(NodeProvider<T,R> nodeProvider) |
void |
setParentResults(ExecutionResults<T,R> parentResults)
sets the parent results
|
boolean |
shouldConsiderExecutionError() |
boolean |
shouldExecute(ExecutionResults<T,R> parentResults)
Defines whether or not this task should be executed
|
ExecutionStatus |
status(Node<T,R> node) |
String |
toString() |
public void setNodeProvider(NodeProvider<T,R> nodeProvider)
nodeProvider - protected ExecutionResult<T,R> getResult(T id)
public ExecutionStatus status(Node<T,R> node)
public void setId(T id)
id - the task idpublic T getId()
public ExecutionResults<T,R> getParentResults()
public void setParentResults(ExecutionResults<T,R> parentResults)
parentResults - public abstract R execute()
public boolean shouldConsiderExecutionError()
public void setConsiderExecutionError(boolean considerExecutionError)
considerExecutionError - the new valuepublic boolean shouldExecute(ExecutionResults<T,R> parentResults)
parentResults - parent execution resultstrue If this task should be executed
false If the task should be skippedpublic void markStart()
public LocalDateTime getStartTime()
public void markEnd()
public LocalDateTime getEndTime()
public boolean isCompleted()
public Duration getTimeout()
public boolean isTimedOut()
Copyright © 2016–2021 Dexecutor. All rights reserved.