ViewStateLockingRepository<E, S, V, M> class abstract interface

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 type
  • S: state type
  • V: version type
  • M: metadata type
Implementers

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 event and 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 state if currentStateVersion still matches storage.
saveWithMetadata(S state, V? currentStateVersion, M metadata) Future<(S, V, M)>
Persists state with metadata if the version still matches storage.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited