public interface SnapshotEventStore extends EventStore
EventStore.readEvents(String, Object)
readEvents(String, AggregateIdentifier)} should return an event stream
that starts with the latest suitable snapshot event available in the event store.Modifier and Type | Method and Description |
---|---|
void |
appendSnapshotEvent(String type,
DomainEventMessage snapshotEvent)
Append the given
snapshotEvent to the snapshot event log for the given type type . |
appendEvents, readEvents
void appendSnapshotEvent(String type, DomainEventMessage snapshotEvent)
snapshotEvent
to the snapshot event log for the given type type
. The
sequence number of the snapshotEvent
must be equal to the sequence number of the last regular
domain
event that is included in the snapshot.
Implementations may choose to prune snapshots upon appending a new snapshot, in order to minimize storage space.type
- The type of aggregate the event belongs tosnapshotEvent
- The event summarizing one or more domain events for a specific aggregate.Copyright © 2010-2014. All Rights Reserved.