Interface SnapshotReceiver

All Superinterfaces:
AutoCloseable, Closeable

public interface SnapshotReceiver extends 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 Type
    Method
    Description
    Returns a stream to read the snapshot from.
    long
    Returns the expected length of the snapshot (in bytes) or -1 if unknown.
    Options granted by the sender.
    long
    Returns the log position to start reading from.
    Member address which is sending the snapshot.

    Methods inherited from interface java.io.Closeable

    close
  • Method Details

    • senderAddress

      SocketAddress senderAddress()
      Member address which is sending the snapshot.
    • options

      Map<String,String> options()
      Options granted by the sender.
      Returns:
      non-null map, possibly empty
    • 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

      InputStream inputStream() throws IOException
      Returns a stream to read the snapshot from. Close the stream or this receiver when done.
      Throws:
      IOException