In Memory States Manager
class InMemoryStatesManager(onContextsConflictResolver: suspend (old: State, new: State, currentNew: State) -> Boolean) : StatesManager
Content copied to clipboard
Parameters
on Contexts Conflict Resolver
Receive old State, new one and the state currently placed on new State.context key. In case when this callback will returns true, the state placed on State.context of new will be replaced by new state by using endChain with that state
Constructors
InMemoryStatesManager
Link copied to clipboard
fun InMemoryStatesManager(onContextsConflictResolver: suspend (old: State, new: State, currentNew: State) -> Boolean = { _, _, _ -> true })
Content copied to clipboard
Functions
get Active States
Link copied to clipboard
start Chain
Link copied to clipboard
Starts chain with state as first State. May returns false in case of State.context of state is already busy by the other State
update
Link copied to clipboard
Must set current set using State.context
Properties
onChainStateUpdated
Link copied to clipboard
onEndChain
Link copied to clipboard
onStartChain
Link copied to clipboard