TaskContextImpl — Default TaskContext

TaskContextImpl is a concrete TaskContext that is created exclusively when Task is requested to run (when Executor is requested to launch a task (on "Executor task launch worker" thread pool) sometime in the future).

TaskContextImpl takes the following to be created:

Table 1. TaskContextImpl’s Internal Properties (e.g. Registries, Counters and Flags)
Name Description

onCompleteCallbacks

(ArrayBuffer[TaskCompletionListener])

Used when…​FIXME

onFailureCallbacks

(ArrayBuffer[TaskFailureListener])

Used when…​FIXME

reasonIfKilled

Reason if the task was killed

Used when…​FIXME

completed

Flag whether…​FIXME

Default: false

Used when…​FIXME

failed

Flag whether…​FIXME

Default: false

Used when…​FIXME

failure

java.lang.Throwable that caused a failure

Used when…​FIXME

_fetchFailedException

FetchFailedException if there was a fetch failure

Used when…​FIXME

addTaskCompletionListener Method

addTaskCompletionListener(listener: TaskCompletionListener): TaskContext
Note
addTaskCompletionListener is part of the TaskContext Contract to register a TaskCompletionListener.

addTaskCompletionListener…​FIXME

addTaskFailureListener Method

addTaskFailureListener(listener: TaskFailureListener): TaskContext
Note
addTaskFailureListener is part of the TaskContext Contract to register a TaskFailureListener.

addTaskFailureListener…​FIXME

markTaskFailed Method

markTaskFailed(error: Throwable): Unit
Note
markTaskFailed is part of the TaskContext Contract to mark the task as failed and trigger the TaskFailureListeners.

markTaskFailed…​FIXME

markTaskCompleted Method

markTaskCompleted(error: Option[Throwable]): Unit
Note
markTaskCompleted is part of the TaskContext Contract to mark the task as completed and trigger the TaskCompletionListeners.

markTaskCompleted…​FIXME

invokeListeners Internal Method

invokeListeners[T](
  listeners: Seq[T],
  name: String,
  error: Option[Throwable])(
  callback: T => Unit): Unit

invokeListeners…​FIXME

Note
invokeListeners is used when…​FIXME

markInterrupted Method

markInterrupted(reason: String): Unit
Note
markInterrupted is part of the TaskContext Contract to mark the task for interruption, i.e. cancellation.

markInterrupted…​FIXME

killTaskIfInterrupted Method

killTaskIfInterrupted(): Unit
Note
killTaskIfInterrupted is part of the TaskContext Contract to mark the task for interruption, i.e. cancellation.

killTaskIfInterrupted…​FIXME

results matching ""

    No results matching ""