Stores and retrieves materialized-view state with optimistic locking.
The repository returns the version of fetched state. Saves can use that version to reject updates when the stored state changed concurrently.
E: event typeS: state typeV: version typeM: metadata type
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
fetchState(
E event) → Future< (S?, V?)> -
Returns the current state affected by
eventand its version. -
fetchStateWithMetadata(
E event) → Future< (S?, V?, M)> -
Returns the current state, version, and metadata for
event. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
save(
S state, V? currentStateVersion) → Future< (S, V)> -
Persists
stateifcurrentStateVersionstill matches storage. -
saveWithMetadata(
S state, V? currentStateVersion, M metadata) → Future< (S, V, M)> -
Persists
statewithmetadataif the version still matches storage. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited