# DefaultStatesManagerRepo

interface DefaultStatesManagerRepo < T : State >(source)

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

#### Inheritors

InMemoryDefaultStatesManagerRepo
KeyValueBasedDefaultStatesManagerRepo

## Functions

contains
Link copied to clipboard
open suspend fun contains (context: Any ): Boolean
getContextState
Link copied to clipboard
abstract suspend fun getContextState (context: Any ): T ?
getStates
Link copied to clipboard
abstract suspend fun getStates (): List < T >
removeAndSet
Link copied to clipboard
open suspend fun removeAndSet (toRemove: T , toSet: T )

Semantically, calls removeState and then set

removeState
Link copied to clipboard
abstract suspend fun removeState (state: T )

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
abstract suspend fun set (state: T )

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