Interface SnapshotReceiver
- All Superinterfaces:
AutoCloseable
,Closeable
Receiver-side object for controlling the transmission of a database snapshot to a new group
member. A
SnapshotReceiver
is paired with a SnapshotSender
on the remote
member which has the complete database.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionReturns a stream to read the snapshot from.long
length()
Returns the expected length of the snapshot (in bytes) or -1 if unknown.options()
Options granted by the sender.long
position()
Returns the log position to start reading from.Member address which is sending the snapshot.
-
Method Details
-
senderAddress
SocketAddress senderAddress()Member address which is sending the snapshot. -
options
-
length
long length()Returns the expected length of the snapshot (in bytes) or -1 if unknown. -
position
long position()Returns the log position to start reading from. Is expected to be the highest exclusive position applied by the snapshot. -
inputStream
Returns a stream to read the snapshot from. Close the stream or this receiver when done.- Throws:
IOException
-