TraceableState

sealed class TraceableState<out T, out E>

An abstraction for the current state of a job or task.

Parameters

T

The type of object used for providing context when the job is executing. Use Unit if no context is associated when tracking execution.

E

The type of object used for providing context when the job fails without throwing an exception. Use Unit if no context is available when a job fails.

Inheritors

Constructors

Link copied to clipboard
protected constructor()

Types

Link copied to clipboard

A TraceableState instance indicating that the job or task has completed successfully.

Link copied to clipboard

A TraceableState instance indicating that the job or task has been created.

Link copied to clipboard

A TraceableState instance indicating that the job or task has thrown an exception.

Link copied to clipboard
data class Executing<T>(val data: T) : TraceableState<T, Nothing>

A TraceableState instance indicating that the job or task is currently executing.

Link copied to clipboard
data class GenericFailure<E>(val data: E) : TraceableState.TaskCompletion<E>

A TraceableState instance indicating that the job or task has failed.

Link copied to clipboard

A TraceableState indicating that the job or task is completed.

Properties

Link copied to clipboard

The error context, or null if this is not a GenericFailure.

Link copied to clipboard

The thrown exception, or null if this is not an ExceptionalFailure.

Link copied to clipboard

The execution context, or null if this is not Executing.