Class NullStateStore
java.lang.Object
org.pipservices3.components.state.NullStateStore
- All Implemented Interfaces:
IStateStore
Dummy state store implementation that doesn't do anything.
It can be used in testing or in situations when state management is not required
but shall be disabled.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> TDeletes a state from the store by its key.<T> TLoads state from the store using its key.<T> List<StateValue<T>>Loads an array of states from the store using their keys.<T> TSaves state into the store.
-
Constructor Details
-
NullStateStore
public NullStateStore()
-
-
Method Details
-
load
Loads state from the store using its key. If value is missing in the stored it returns null.- Specified by:
loadin interfaceIStateStore- Type Parameters:
T-- Parameters:
correlationId- (optional) transaction id to trace execution through call chain.key- a unique state key.- Returns:
- the state value or
nullif value wasn't found.
-
loadBulk
Loads an array of states from the store using their keys.- Specified by:
loadBulkin interfaceIStateStore- Type Parameters:
T-- Parameters:
correlationId- (optional) transaction id to trace execution through call chain.keys- unique state keys.- Returns:
- an array with state values and their corresponding keys.
-
save
Saves state into the store.- Specified by:
savein interfaceIStateStore- Type Parameters:
T-- Parameters:
correlationId- (optional) transaction id to trace execution through call chain.key- a unique state key.value- a state value.- Returns:
- The state that was stored in the store.
-
delete
Deletes a state from the store by its key.- Specified by:
deletein interfaceIStateStore- Type Parameters:
T-- Parameters:
correlationId- (optional) transaction id to trace execution through call chain.key- a unique value key.- Returns:
- deleted value
-