MaterializedLockingDeduplicationView<S, E, EV, SV, M> class abstract interface

Handles events with optimistic locking and event deduplication.

MaterializedLockingDeduplicationView combines ViewStateComputation and ViewStateLockingDeduplicationRepository.

  • S: materialized-view state type
  • E: event type
  • EV: event version type
  • SV: state version type
  • M: metadata type
Implemented types

Properties

evolve Evolve<S, E>
Applies an event to a state and returns the next state.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
initialState → S
State used before any events have been applied.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

computeNewState(S? state, E event) → S
Computes new state based on the event.
inherited
fetchState(E event) Future<(S?, SV?)>
Returns the current state affected by event and its state version.
inherited
fetchStateWithMetadata(E event) Future<(S?, SV?, M)>
Returns the current state, state version, and metadata for event.
inherited
handleOptimisticallyWithDeduplication((E, EV) eventAndVersion) Future<(S, SV)>
Handles eventAndVersion with optimistic locking and event deduplication.
handleOptimisticallyWithDeduplicationAndMetadata((E, EV) eventAndVersion, M metadata) Future<(S, SV, M)>
Handles eventAndVersion with metadata, optimistic locking, and event deduplication.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
save(S state, EV eventVersion, SV? currentStateVersion) Future<(S, SV)>
Persists state if the state and event versions are acceptable.
inherited
saveWithMetadata(S state, EV eventVersion, SV? currentStateVersion, M metadata) Future<(S, SV, M)>
Persists state with metadata when versions are acceptable.
inherited
toString() String
A string representation of this object.
inherited

Operators

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