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 inExecutor) |
public TaskManagement(int numberOfThreads,
Diagnostics diagnostics)
public void rejectedExecution(java.lang.Runnable r,
java.util.concurrent.ThreadPoolExecutor inExecutor)
rejectedExecution in interface java.util.concurrent.RejectedExecutionHandlerpublic void abnormalOperationTermination(java.lang.String taskIdentifier,
java.lang.String reason)
TaskLifecycleObserverOperation.abnormalOperationTermination in interface TaskLifecycleObservertaskIdentifier - 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)
TaskLifecycleObserverisComplete in interface TaskLifecycleObservertaskIdentifier - The identifier of the Task whose life cycle transition is
being reported on.public void isExecuting(java.lang.String taskIdentifier)
TaskLifecycleObserverisExecuting in interface TaskLifecycleObservertaskIdentifier - The identifier of the Task whose life cycle transition is
being reported on.public void isInitializing(java.lang.String taskIdentifier)
TaskLifecycleObserverisInitializing in interface TaskLifecycleObservertaskIdentifier - The identifier of the Task whose life cycle transition is
being reported on.public void isReady(java.lang.String taskIdentifier)
TaskLifecycleObserverisReady in interface TaskLifecycleObservertaskIdentifier - The identifier of the Task whose life cycle transition is
being reported on.public void isWaitingForData(java.lang.String taskIdentifier)
TaskLifecycleObserverisWaitingForData in interface TaskLifecycleObservertaskIdentifier - The identifier of the Task whose life cycle transition is
being reported on.public void isChangedPeriodicExecution(java.lang.String taskIdentifier)
TaskLifecycleObserverisChangedPeriodicExecution in interface TaskLifecycleObservertaskIdentifier - The identifier of the Task whose life cycle transition is
being reported on.