Class InMemoryStateProvider
java.lang.Object
com.kingsrook.qqq.backend.core.state.InMemoryStateProvider
- All Implemented Interfaces:
StateProviderInterface
Singleton class that provides a (non-persistent!!) in-memory state provider.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Clean entries that started before the given Instant<T extends Serializable>
Optional<T> get
(Class<? extends T> type, AbstractStateKey key) Get a block of data, under a key, from the state store.static InMemoryStateProvider
Singleton accessor<T extends Serializable>
voidput
(AbstractStateKey key, T data) Put a block of data, under a key, into the state store.void
remove
(AbstractStateKey key) Remove a block of data, under a key, from the state store.status()
Get the current status
-
Method Details
-
getInstance
Singleton accessor -
put
Put a block of data, under a key, into the state store.- Specified by:
put
in interfaceStateProviderInterface
-
get
Get a block of data, under a key, from the state store.- Specified by:
get
in interfaceStateProviderInterface
-
remove
Remove a block of data, under a key, from the state store.- Specified by:
remove
in interfaceStateProviderInterface
-
status
Get the current status- Specified by:
status
in interfaceStateProviderInterface
-
clean
Clean entries that started before the given Instant- Specified by:
clean
in interfaceStateProviderInterface
-