public class FileSystemSnapshotEventReader extends Object
snapshotEventFile and
skips the correct number of bytes in the given eventFile.| Constructor and Description |
|---|
FileSystemSnapshotEventReader(InputStream eventFile,
InputStream snapshotEventFile,
Serializer eventSerializer)
Creates a snapshot event reader that reads the latest snapshot from the
snapshotEventFile. |
| Modifier and Type | Method and Description |
|---|---|
DomainEventMessage |
readSnapshotEvent(String type,
Object identifier)
Reads the latest snapshot of the given aggregate identifier.
|
public FileSystemSnapshotEventReader(InputStream eventFile, InputStream snapshotEventFile, Serializer eventSerializer)
snapshotEventFile.eventFile - used to skip the number of bytes specified by the latest snapshotsnapshotEventFile - the file to read snapshots fromeventSerializer - the serializer that is used to deserialize events in snapshot filepublic DomainEventMessage readSnapshotEvent(String type, Object identifier) throws IOException
type - the aggregate's typeidentifier - the aggregate's identifierIOException - when reading the snapshotEventFile or reading the eventFile failedCopyright © 2010-2014. All Rights Reserved.