org.axonframework.eventstore
Interface SnapshotEventStore
- All Superinterfaces:
- EventStore
- All Known Implementing Classes:
- FileSystemEventStore, JpaEventStore, MongoEventStore
public interface SnapshotEventStore
- extends EventStore
Interface describing an event store that is able to store snapshot events. Implementations must also take the stored
snapshots into account when loading events. That means that any call to readEvents(String, AggregateIdentifier) should return an event stream
that starts with the latest suitable snapshot event available in the event store.
- Since:
- 0.5
- Author:
- Allard Buijze
appendSnapshotEvent
void appendSnapshotEvent(String type,
DomainEvent snapshotEvent)
- Append the given
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.
Note that the aggregate identifier and sequence number must be set on the DomainEvent. See DomainEvent.DomainEvent(long, org.axonframework.domain.AggregateIdentifier).
- Parameters:
type - The type of aggregate the event belongs tosnapshotEvent - The event summarizing one or more domain events for a specific aggregate.- See Also:
org.axonframework.domain.DomainEvent#DomainEvent(long, org.axonframework.domain.AggregateIdentifier))
Copyright © 2011. All Rights Reserved.