DefaultStatesManagerRepo

interface DefaultStatesManagerRepo

Implement this repo if you want to use some custom repo for DefaultStatesManager

Functions

contains
Link copied to clipboard
common
open suspend fun contains(context: Any): Boolean
getContextState
Link copied to clipboard
common
abstract suspend fun getContextState(context: Any): State?
getStates
Link copied to clipboard
common
abstract suspend fun getStates(): List<State>
removeState
Link copied to clipboard
common
abstract suspend fun removeState(state: State)

Remove exactly state. In case if internally State.context is busy with different State, that State should NOT be removed

set
Link copied to clipboard
common
abstract suspend fun set(state: State)

Must save state as current state of chain with State.context of state

Inheritors

InMemoryDefaultStatesManagerRepo
Link copied to clipboard
KeyValueBasedDefaultStatesManagerRepo
Link copied to clipboard