GraphSnapshot

sealed interface GraphSnapshot<out State>

Where the run of a GraphSession stands. A screen draws one of these with a when, and each holds what it needs to.

Inheritors

Types

Link copied to clipboard
data class Completed<out State>(val state: State) : GraphSnapshot<State>

The run reached END with state.

Link copied to clipboard
data object Idle : GraphSnapshot<Nothing>

Nothing has run in this session, and GraphSession.restore found no run of the thread.

Link copied to clipboard
data class Interrupted<out State>(val state: State, val nextNodes: List<String>) : GraphSnapshot<State>

The run paused, usually for a person to decide, and GraphSession.resume continues it.

Link copied to clipboard

GraphSession.restore is reading the last checkpoint of the thread.

Link copied to clipboard
data class Running<out State>(val state: State, val nodes: List<String>) : GraphSnapshot<State>

The run is going on.

Link copied to clipboard
data class Stopped<out State>(val state: State?, val cause: Throwable?) : GraphSnapshot<State>

The run ended before END and before an interrupt. With a checkpointer, GraphSession.resume continues from the last step that finished.

Properties

Link copied to clipboard
abstract val state: State?

The state of the run as far as the session knows it, or null when it knows none.