Package dev. inmo. micro_utils. fsm. common. managers
Types
Default States Manager
Link copied to clipboard
open class DefaultStatesManager<T : State>( repo: DefaultStatesManagerRepo<T> = InMemoryDefaultStatesManagerRepo(), onStartContextsConflictResolver: suspend (current: T, new: T) -> Boolean = { _, _ -> true }, onUpdateContextsConflictResolver: suspend (old: T, new: T, currentNew: T) -> Boolean = { _, _, _ -> true }) : StatesManager<T>
Content copied to clipboard
open class DefaultStatesManager<T : State>( repo: DefaultStatesManagerRepo<T> = InMemoryDefaultStatesManagerRepo(), onStartContextsConflictResolver: suspend (current: T, new: T) -> Boolean = { _, _ -> true }, onUpdateContextsConflictResolver: suspend (old: T, new: T, currentNew: T) -> Boolean = { _, _, _ -> true }) : StatesManager<T>
Content copied to clipboard
open class DefaultStatesManager<T : State>( repo: DefaultStatesManagerRepo<T> = InMemoryDefaultStatesManagerRepo(), onStartContextsConflictResolver: suspend (current: T, new: T) -> Boolean = { _, _ -> true }, onUpdateContextsConflictResolver: suspend (old: T, new: T, currentNew: T) -> Boolean = { _, _, _ -> true }) : StatesManager<T>
Content copied to clipboard
Default States Manager Repo
Link copied to clipboard
Implement this repo if you want to use some custom repo for DefaultStatesManager
Implement this repo if you want to use some custom repo for DefaultStatesManager
Implement this repo if you want to use some custom repo for DefaultStatesManager
In Memory Default States Manager Repo
Link copied to clipboard
class InMemoryDefaultStatesManagerRepo<T : State>(map: MutableMap<Any, T> = mutableMapOf()) : DefaultStatesManagerRepo<T>
Content copied to clipboard
Simple DefaultStatesManagerRepo for DefaultStatesManager which will store data in map and use primitive functionality
class InMemoryDefaultStatesManagerRepo<T : State>(map: MutableMap<Any, T> = mutableMapOf()) : DefaultStatesManagerRepo<T>
Content copied to clipboard
Simple DefaultStatesManagerRepo for DefaultStatesManager which will store data in map and use primitive functionality
class InMemoryDefaultStatesManagerRepo<T : State>(map: MutableMap<Any, T> = mutableMapOf()) : DefaultStatesManagerRepo<T>
Content copied to clipboard
Simple DefaultStatesManagerRepo for DefaultStatesManager which will store data in map and use primitive functionality