Interface SnapshotSender

All Superinterfaces:
AutoCloseable, Closeable

public interface SnapshotSender extends Closeable
Sender-side object for controlling the transmission of a database snapshot to a new group member. A SnapshotSender is paired with a SnapshotReceiver on the remote member which is joining the group.
See Also:
  • Method Details

    • receiverAddress

      SocketAddress receiverAddress()
      Member address which is receiving the snapshot.
    • options

      Map<String,String> options()
      Options requested by the receiver.
      Returns:
      non-null map, possibly empty
    • begin

      OutputStream begin(long length, long position, Map<String,String> options) throws IOException
      Begin writing the snapshot to the receiver.
      Parameters:
      length - expected length of snapshot (in bytes) or -1 if unknown
      position - log reading begins at this position; expected to be the highest exclusive position applied by the snapshot
      options - granted to the receiver; can pass null if none
      Returns:
      a stream to write the snapshot into; close the stream or this sender when done
      Throws:
      IOException