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 TypeMethodDescriptionvoidClean 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 InMemoryStateProviderSingleton accessor<T extends Serializable>
voidput(AbstractStateKey key, T data) Put a block of data, under a key, into the state store.voidremove(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:
putin interfaceStateProviderInterface
-
get
Get a block of data, under a key, from the state store.- Specified by:
getin interfaceStateProviderInterface
-
remove
Remove a block of data, under a key, from the state store.- Specified by:
removein interfaceStateProviderInterface
-
status
Get the current status- Specified by:
statusin interfaceStateProviderInterface
-
clean
Clean entries that started before the given Instant- Specified by:
cleanin interfaceStateProviderInterface
-