FlowIORequest

sealed class FlowIORequest<out R : Any>

A FlowIORequest represents an IO request of a flow when it suspends. It is persisted in checkpoints.

Inheritors

Types

Link copied to clipboard
data class CloseSessions(val sessions: NonEmptySet<FlowSession>) : FlowIORequest<Unit>

Closes the specified sessions.

Link copied to clipboard
data class ExecuteAsyncOperation<T : Any>(val operation: FlowAsyncOperation<T>) : FlowIORequest<T>

Execute the specified operation, suspend the flow until completion.

Link copied to clipboard

Indicates that no actual IO request occurred, and the flow should be resumed immediately. This is used for performing explicit checkpointing anywhere in a flow.

Link copied to clipboard

Get the FlowInfo of the specified sessions.

Link copied to clipboard

Receive messages from sessions.

Link copied to clipboard
data class Send(val sessionToMessage: Map<FlowSession, SerializedBytes<Any>>) : FlowIORequest<Unit>

Send messages to sessions.

Link copied to clipboard
data class SendAndReceive(val sessionToMessage: Map<FlowSession, SerializedBytes<Any>>, val shouldRetrySend: Boolean) : FlowIORequest<Map<FlowSession, SerializedBytes<Any>>>

Send and receive messages from the specified sessions.

Link copied to clipboard
data class Sleep(val wakeUpAfter: Instant) : FlowIORequest<Unit>

Suspend the flow until the specified time.

Link copied to clipboard

Wait for a transaction to be committed to the database.

Link copied to clipboard

Suspend the flow until all Initiating sessions are confirmed.