org.axonframework.eventstore
Interface SnapshotEventStore

All Superinterfaces:
EventStore
All Known Implementing Classes:
FileSystemEventStore, GaeEventStore, JdbcEventStore, JpaEventStore, MongoEventStore, 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 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.

Since:
0.5
Author:
Allard Buijze

Method Summary
 void appendSnapshotEvent(String type, DomainEventMessage snapshotEvent)
          Append the given snapshotEvent to the snapshot event log for the given type type.
 
Methods inherited from interface org.axonframework.eventstore.EventStore
appendEvents, readEvents
 

Method Detail

appendSnapshotEvent

void appendSnapshotEvent(String type,
                         DomainEventMessage 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.

Implementations may choose to prune snapshots upon appending a new snapshot, in order to minimize storage space.

Parameters:
type - The type of aggregate the event belongs to
snapshotEvent - The event summarizing one or more domain events for a specific aggregate.


Copyright © 2010-2016. All Rights Reserved.