org.axonframework.eventstore.fs
Class FileSystemSnapshotEventWriter
java.lang.Object
org.axonframework.eventstore.fs.FileSystemSnapshotEventWriter
public class FileSystemSnapshotEventWriter
- extends Object
Writes snapshot events to the given snapshotEventFile
.
- Since:
- 2.0
- Author:
- Frank Versnel
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FileSystemSnapshotEventWriter
public FileSystemSnapshotEventWriter(InputStream eventFile,
OutputStream snapshotEventFile,
Serializer eventSerializer)
- Creates a snapshot event writer that writes any given
snapshotEvent
to the given
snapshotEventFile
.
- Parameters:
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 events
writeSnapshotEvent
public void writeSnapshotEvent(DomainEventMessage snapshotEvent)
- Writes the given snapshotEvent to the
snapshotEventFile
.
Prepends a long value to the event in the file indicating the bytes to skip when reading the eventFile
.
- Parameters:
snapshotEvent
- The snapshot to write to the snapshotEventFile
Copyright © 2010-2016. All Rights Reserved.