EnqueuedJob

abstract class EnqueuedJob

Base abstraction for single-use model that tracks the state of a queue-able job. Once completed, either successfully or by cancellation/error, the EnqueuedJob is dead and should be discarded.

Heavily inspired by kotlinx.coroutines.Job

See also

Types

Link copied to clipboard
object Companion
Link copied to clipboard

Dynamic configuration for implementors of EnqueuedJob in order to modify how it wants to handle interactions while in a state of Executing.

Link copied to clipboard

Properties

Link copied to clipboard
Link copied to clipboard
@get:JvmName(name = "isActive")
val isActive: Boolean

Checks if the job is in a completion state or not.

Link copied to clipboard
@get:JvmName(name = "isCancelled")
val isCancelled: Boolean
Link copied to clipboard
@get:JvmName(name = "isCompleting")
val isCompleting: Boolean

An intermediate "state" indicating that completion, either by success or error/cancellation, is underway.

Link copied to clipboard
@get:JvmName(name = "isError")
val isError: Boolean
Link copied to clipboard
@get:JvmName(name = "isSuccess")
val isSuccess: Boolean
Link copied to clipboard

The name for this job. Will be utilized with error handling for contextual purposes.

Link copied to clipboard
@get:JvmName(name = "state")
val state: EnqueuedJob.State

The current State of the job.

Functions

Link copied to clipboard

Cancel the job.

Link copied to clipboard

Register a handle to be invoked when this EnqueuedJob completes, either successfully or by cancellation/error. If handle is already registered, Disposable.noOp is returned.