Interface StateProviderInterface
- All Known Implementing Classes:
InMemoryStateProvider
,TempFileStateProvider
public interface StateProviderInterface
QQQ state provider interface. Provides standard interface for various
implementations of how to store invalid input: '&' retrieve user/process state data, like
sessions, or process data. Not like permanent record data - that is done in
Backend modules.
Different implementations may be: in-memory (non-persistent!!), or on-disk
(with the tradeoffs that has), in-database, in-cache-system, etc.
Things which probably haven't been thought about here include:
- multi-layering. e.g., always have an in-memory layer on top of a more
persistent backend, but then how to avoid staleness in-memory?
- cleanup. when do we ever purge things to avoid running out of memory/storage?
-
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.<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
-
put
Put a block of data, under a key, into the state store. -
get
Get a block of data, under a key, from the state store. -
remove
Remove a block of data, under a key, from the state store. -
status
String status()Get the current status -
clean
Clean entries that started before the given Instant
-