public class TaskManagement extends java.lang.Object implements java.util.concurrent.RejectedExecutionHandler, TaskLifecycleObserver
Constructor and Description |
---|
TaskManagement(int numberOfThreads,
Diagnostics diagnostics) |
Modifier and Type | Method and Description |
---|---|
void |
abnormalOperationTermination(java.lang.String taskIdentifier,
java.lang.String reason)
Indicates that the task in question has terminated abnormally.
|
void |
isChangedPeriodicExecution(java.lang.String taskIdentifier)
Indicates that the task in question has changed it execution profile.
|
void |
isComplete(java.lang.String taskIdentifier)
Indicates that the task in question has finished processing.
|
void |
isExecuting(java.lang.String taskIdentifier)
Indicates that the task in question has been scheduled for execution and
is currently executing.
|
void |
isInitializing(java.lang.String taskIdentifier)
Indicates that the task is question is currently performing
initialization related operations.
|
void |
isReady(java.lang.String taskIdentifier)
When a task is ready for execution, this method is invoked on its
registered observer.
|
void |
isWaitingForData(java.lang.String taskIdentifier)
Indicates that the task in question is waiting for the arrival of data to
begin processing.
|
void |
manageExecution(java.lang.String taskIdentifier,
Operation operation)
Manage the execution of the given operation
|
void |
rejectedExecution(java.lang.Runnable r,
java.util.concurrent.ThreadPoolExecutor executor) |
public TaskManagement(int numberOfThreads, Diagnostics diagnostics)
public void rejectedExecution(java.lang.Runnable r, java.util.concurrent.ThreadPoolExecutor executor)
rejectedExecution
in interface java.util.concurrent.RejectedExecutionHandler
public void abnormalOperationTermination(java.lang.String taskIdentifier, java.lang.String reason)
TaskLifecycleObserver
Operation
.abnormalOperationTermination
in interface TaskLifecycleObserver
taskIdentifier
- The identifier of the Task whose life cycle transition is
being reported on.reason
- A description of the cause of the error.public void manageExecution(java.lang.String taskIdentifier, Operation operation) throws ProcessingException, DatasetException, SchedulingException
taskIdentifier
- The identifier of the task being started up.operation
- The operation that needs to be submitted for executionProcessingException
- If there are problems initializing the operationDatasetException
- If there are problems in accessing the underling datasetSchedulingException
- If there are problems in scheduling the operationpublic void isComplete(java.lang.String taskIdentifier)
TaskLifecycleObserver
isComplete
in interface TaskLifecycleObserver
taskIdentifier
- The identifier of the Task whose life cycle transition is
being reported on.public void isExecuting(java.lang.String taskIdentifier)
TaskLifecycleObserver
isExecuting
in interface TaskLifecycleObserver
taskIdentifier
- The identifier of the Task whose life cycle transition is
being reported on.public void isInitializing(java.lang.String taskIdentifier)
TaskLifecycleObserver
isInitializing
in interface TaskLifecycleObserver
taskIdentifier
- The identifier of the Task whose life cycle transition is
being reported on.public void isReady(java.lang.String taskIdentifier)
TaskLifecycleObserver
isReady
in interface TaskLifecycleObserver
taskIdentifier
- The identifier of the Task whose life cycle transition is
being reported on.public void isWaitingForData(java.lang.String taskIdentifier)
TaskLifecycleObserver
isWaitingForData
in interface TaskLifecycleObserver
taskIdentifier
- The identifier of the Task whose life cycle transition is
being reported on.public void isChangedPeriodicExecution(java.lang.String taskIdentifier)
TaskLifecycleObserver
isChangedPeriodicExecution
in interface TaskLifecycleObserver
taskIdentifier
- The identifier of the Task whose life cycle transition is
being reported on.