MemoryStateStore class
State store that keeps states in the process memory.
Remember: This implementation is not suitable for synchronization of distributed processes.
Configuration parameters
options:
- timeout: default caching timeout in milliseconds (default: disabled)
See: ICache
Example
var store = MemoryStateStore();
var value = await store.load("123", "key1");
...
await store.save("123", "key1", "ABC");
- Implemented types
Constructors
Properties
- hashCode → int
-
The hash code for this object.
read-onlyinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
read-onlyinherited
Methods
-
configure(
ConfigParams config) → void - Configures component by passing configuration parameters.
-
delete<
T>( String? correlationId, String key) → Future< T?> -
Deletes a state from the store by its key.
override
-
load<
T>( String? correlationId, String key) → Future< T?> -
Loads stored value from the store using its key.
If value is missing in the store it returns null.
override
-
loadBulk<
T>( String? correlationId, List< String> keys) → Future< List< StateValue< T>>> -
Loads an array of states from the store using their keys.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
save<
T>( String? correlationId, String key, dynamic value) → Future< T> -
Saves state into the store
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited