continuum_event_sourcing library

Continuum Event Sourcing — event sourcing persistence strategy.

Provides event store abstractions, serialization, projection system, and the event-sourcing-specific session implementation that extends the Unit of Work session engine.

Classes

AsyncProjectionExecutor
Executes async projections for background processing.
AtomicEventStore
Optional extension to EventStore for atomic multi-stream writes.
EventSerializer
Abstraction for converting domain events to/from persisted representation.
EventSerializerEntry
Entry containing all serialization info for an event type.
EventSerializerRegistry
Registry mapping Dart types to their serialization configurations.
EventSourcingStore
Root object for event sourcing infrastructure.
EventStore
Low-level abstraction for event persistence operations.
ExpectedVersion
Represents the expected version for optimistic concurrency control.
GeneratedAggregate
Bundles all generated registries for a single aggregate type.
GeneratedProjection
Metadata bundle for a generated projection.
InlineProjectionExecutor
Executes inline projections synchronously after commit.
InMemoryProjectionPositionStore
In-memory implementation of ProjectionPositionStore for testing.
JsonEventSerializer
JSON-based implementation of EventSerializer.
MultiStreamProjection<TReadModel, TKey>
Projection that derives a read model from operations across multiple streams.
PollingProjectionProcessor
Polling-based implementation of ProjectionProcessor.
ProcessingResult
Result of processing a batch of events through async projections.
ProjectionBase<TReadModel, TKey>
Base class for all projection types.
ProjectionEventStore
Optional extension to EventStore for projection support.
ProjectionPosition
Tracks the processing position for an async projection.
ProjectionPositionStore
Abstraction for persisting async projection positions.
ProjectionProcessor
Abstraction for continuous projection processing.
ProjectionRegistration<TReadModel, TKey>
Bundles a projection with its lifecycle mode and read model store.
ProjectionRegistry
Central registry for all projections in the application.
ReadModelResult<T>
Result of loading a read model with staleness information.
ReadModelStore<TReadModel, TKey>
Abstraction for read model storage.
SerializedEvent
Intermediate representation of a serialized event for persistence.
SessionImpl
Internal implementation of the session interface for event sourcing.
SingleStreamProjection<TReadModel>
Projection that derives a read model from a single aggregate stream.
StoredEvent
Represents a persisted domain event with storage metadata.
StreamAppendBatch
A batch of events to append to a single stream.

Enums

ProjectionLifecycle
Controls how a projection is executed relative to event persistence.

Typedefs

EventFromJsonFactory = ContinuumEvent Function(Map<String, dynamic> json)
Function type for deserializing events from JSON data.
EventLoader = Future<List<StoredEvent>> Function(int fromGlobalSequence, int limit)
Function type for loading events from a global sequence position.
EventToJsonFactory = Map<String, dynamic> Function(ContinuumEvent event)
Function type for serializing continuum events to JSON.

Exceptions / Errors

ConcurrencyException
Thrown when an optimistic concurrency conflict is detected during save operations.
UnsupportedOperationException
Thrown when no handler is registered for an operation type.
UnsupportedProjectionOperationException
Thrown when a projection receives an operation type it does not handle.