Interface ITaskProcessor
- All Known Implementing Classes:
TestTaskProcessor
Abstraction of the DD task processor. The object that implements this interface should be provided by the
IDerivedDataTaskSupplier
so the task being scheduled by the DerivedDataTaskScheduler
could be executed-
Method Summary
Modifier and TypeMethodDescriptionvoid
cancel()
Marks the task being processed by this processor as cancelled.void
Dumps the stack of the current process.Task target stage of an async. pipelineGets the name of the taskboolean
isCancelled
(Object cancelRequestHandle) Checks if the task is cancelledboolean
Checks if the task that will be/being performed by this processor is a priority onevoid
registerCancelRequest
(Object cancelRequestHandle) Registers a cancel requestvoid
setFuture
(CompletableFuture<Void> future) Sets the future of a launched task
-
Method Details
-
cancel
void cancel()Marks the task being processed by this processor as cancelled. -
isPriorityTask
boolean isPriorityTask()Checks if the task that will be/being performed by this processor is a priority one- Returns:
- True if the executed task is a priority task
-
getTargetStage
DerivedDataSegmentBucket getTargetStage()Task target stage of an async. pipeline- Returns:
- The target stage of a task being procesed within this processor. May not be
null
-
getTaskName
String getTaskName()Gets the name of the task- Returns:
- The name of the task. May not be
null
-
isCancelled
Checks if the task is cancelled- Parameters:
cancelRequestHandle
- The handle of the cancel request. May not benull
- Returns:
- True if the task is cancelled
-
dumpCurrentProcess
void dumpCurrentProcess()Dumps the stack of the current process. Used only for tracing/debugging -
registerCancelRequest
Registers a cancel request- Parameters:
cancelRequestHandle
- The handle of a cancel request. May not benull
-
setFuture
Sets the future of a launched task- Parameters:
future
- The task to set. May not benull
-