Class SnapshotCapableEventStorageEngine

java.lang.Object
org.axonframework.eventsourcing.eventstore.SnapshotCapableEventStorageEngine
All Implemented Interfaces:
DescribableComponent, EventStorageEngine

@Internal public class SnapshotCapableEventStorageEngine extends Object implements EventStorageEngine
Decorator for an EventStorageEngine that adds support for the SourcingStrategy.Snapshot sourcing strategy for stores that do not support this strategy natively.

When the given SourcingCondition carries a SourcingStrategy.Snapshot strategy, this decorator loads the latest snapshot from the given SnapshotStore and prepends it as a synthetic leading message to the event stream, followed by the events that occurred after the snapshot's position. If no snapshot is found, or if loading fails, it falls back to full event sourcing from the beginning.

All other sourcing strategies, as well as all append and streaming operations, are delegated directly to the wrapped engine.

Since:
5.1.0
Author:
John Hendrikx