public class ExecutableTask extends Object implements Runnable, DatasetCollectionObserver
Modifier and Type | Field and Description |
---|---|
boolean |
executing |
Modifier | Constructor and Description |
---|---|
protected |
ExecutableTask(String taskIdentifier,
Operation operation,
TaskLifecycleObserver taskLifetimeObserver) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object anObject) |
long |
getExecutionInterval()
For a task that needs to be executed periodically, this method is used to
retrieve the interval at which the task needs to be executed
periodically.
|
String |
getIdentifier()
Retrieve the identifier for the executable task
|
long |
getInitialDelayForPeriodicTask()
This method returns the time at which the periodic task will execute for
the first time.
|
Operation |
getOperation()
Retrieve the operation that will be executed by this task
|
TaskLifecycleMetrics |
getTaskLifecycleMetrics()
Retrieve the TaskLifecyleMetrics associated with this task.
|
int |
hashCode() |
boolean |
isExecutePeriodically()
A check to see if the task in question needs to be executed periodically.
|
void |
onDataAvailability()
This method is invoked on the observers to reflect the availability of
new data in the dataset collection.
|
void |
onDatasetCollectionClosure()
This method is invoked on the observers to reflect the closure of the
dataset collection.
|
boolean |
passesReadinessCheck()
Checks to see if the task is ready for execution.
|
void |
run() |
void |
setExecutionStatus(int executionStatus)
Set the execution status for the lifecycle metrics.
|
void |
setTaskCompletionInfo(String taskCompletionInfo)
Include some information about the completion of the task.
|
protected ExecutableTask(String taskIdentifier, Operation operation, TaskLifecycleObserver taskLifetimeObserver) throws ProcessingException, DatasetException
ProcessingException
DatasetException
public String getIdentifier()
public TaskLifecycleMetrics getTaskLifecycleMetrics()
public void setExecutionStatus(int executionStatus)
executionStatus
- public void setTaskCompletionInfo(String taskCompletionInfo)
taskCompletionInfo
- public Operation getOperation()
public boolean passesReadinessCheck()
public void onDataAvailability()
DatasetCollectionObserver
onDataAvailability
in interface DatasetCollectionObserver
public void onDatasetCollectionClosure()
DatasetCollectionObserver
onDatasetCollectionClosure
in interface DatasetCollectionObserver
public boolean isExecutePeriodically()
true
if the task needs to be executed periodically,
and false
otherwise.public long getExecutionInterval()
public long getInitialDelayForPeriodicTask()
Copyright © 2015. All rights reserved.