Interface Snapshot
- All Superinterfaces:
AutoCloseable, Closeable
Control object used to capture a database snapshot.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Can be called by another thread to abort the snapshot, causing any thread in the writeTo method to throw an exception.booleanReturns false if the snapshot isn't compressible, either because it's already compressed, or if it's encrypted.longlength()Returns total amount of bytes expected to be written to the snapshot stream.longposition()Returns the log start position that the snapshot applies to.voidwriteTo(OutputStream out) Writes out snapshot data, and then closes this object.
-
Method Details
-
length
long length()Returns total amount of bytes expected to be written to the snapshot stream. -
position
long position()Returns the log start position that the snapshot applies to. -
isCompressible
boolean isCompressible()Returns false if the snapshot isn't compressible, either because it's already compressed, or if it's encrypted. -
writeTo
Writes out snapshot data, and then closes this object. Snapshot aborts if the OutputStream throws an exception or if another thread closes this Snapshot instance.- Parameters:
out- snapshot destination; does not require extra buffering; not auto-closed- Throws:
IOException
-
close
Can be called by another thread to abort the snapshot, causing any thread in the writeTo method to throw an exception.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-