public class FileSystemSnapshotEventWriter extends Object
snapshotEventFile
.Constructor and Description |
---|
FileSystemSnapshotEventWriter(InputStream eventFile,
OutputStream snapshotEventFile,
Serializer eventSerializer)
Creates a snapshot event writer that writes any given
snapshotEvent to the given
snapshotEventFile . |
Modifier and Type | Method and Description |
---|---|
void |
writeSnapshotEvent(DomainEventMessage snapshotEvent)
Writes the given snapshotEvent to the
snapshotEventFile . |
public FileSystemSnapshotEventWriter(InputStream eventFile, OutputStream snapshotEventFile, Serializer eventSerializer)
snapshotEvent
to the given
snapshotEventFile
.eventFile
- used to determine the number of bytes to skip upon reading a snapshot
when using FileSystemSnapshotEventReader.readSnapshotEvent(String, Object)
snapshotEventFile
- the snapshot file to write toeventSerializer
- the serializer used to serialize snapshot eventspublic void writeSnapshotEvent(DomainEventMessage snapshotEvent)
snapshotEventFile
.
Prepends a long value to the event in the file indicating the bytes to skip when reading the eventFile
.snapshotEvent
- The snapshot to write to the snapshotEventFile
Copyright © 2010-2014. All Rights Reserved.