public interface SnapshotWriter
| Modifier and Type | Method and Description |
|---|---|
void |
abort()
Refuse the snapshot by closing the output stream and deleting the snapshot data.
|
void |
commit()
Completes the snapshot by closing the output stream and writing the checksum.
|
OutputStream |
getOutputStream()
Returns the output stream of the snapshot which should be used to write the snapshot data.
|
void |
validateAndCommit(byte[] checksum)
Completes the snapshot by closing the output stream and writing its checksum, iff the checksum
is equal to the given checksum.
|
default long |
writeSnapshot(SnapshotSupport snapshotSupport)
Writes the given snapshot to the output stream.
|
OutputStream getOutputStream()
commit() or abort().void commit()
throws Exception
Exception - if fails to write the checksumvoid abort()
default long writeSnapshot(SnapshotSupport snapshotSupport) throws Exception
snapshotSupport - the snapshot objectException - if fails to write the snapshotvoid validateAndCommit(byte[] checksum)
throws Exception
It will call abort on exception, or if the checksums do not match.
checksum - checksum to check againstExceptionCopyright © 2017–2018 camunda services GmbH. All rights reserved.