Contents
Interface Snapshot
- All Superinterfaces:
AutoCloseable
,Closeable
Control object used to capture a database snapshot.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Can be called by another thread to abort the snapshot, causing any thread in the writeTo method to throw an exception.boolean
Returns false if the snapshot isn't compressible, either because it's already compressed, or if it's encrypted.long
length()
Returns total amount of bytes expected to be written to the snapshot stream.long
position()
Returns the log start position that the snapshot applies to.void
writeTo
(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:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-