uniflow-core / io.uniflow.core.flow / ActionReducer

ActionReducer

open class ActionReducer

Action processor component, backed by a coroutine Actor to execute a queue of Actions

enqueueAction - enqueue in incoming Action reduceAction - Execute an action to proceed any state update or event push

Author
Arnaud Giuliani

Constructors

<init>

ActionReducer(defaultPublisher: () -> DataPublisher, coroutineScope: CoroutineScope, defaultDispatcher: CoroutineDispatcher, defaultCapacity: Int = Channel.BUFFERED, tag: String)

Action processor component, backed by a coroutine Actor to execute a queue of Actions

Functions

close

fun close(): Unit

enqueueAction

open fun enqueueAction(action: Action): Unit