Class InstallSnapshot

java.lang.Object
org.opendaylight.controller.cluster.raft.messages.RaftRPC
org.opendaylight.controller.cluster.raft.messages.InstallSnapshot
All Implemented Interfaces:
Serializable, org.apache.pekko.dispatch.ControlMessage

public final class InstallSnapshot extends RaftRPC
Message sent from a leader to install a snapshot chunk on a follower.
See Also:
  • Constructor Details

    • InstallSnapshot

      public InstallSnapshot(long term, String leaderId, long lastIncludedIndex, long lastIncludedTerm, byte[] data, int chunkIndex, int totalChunks, OptionalInt lastChunkHashCode, @Nullable VotingConfig votingConfig, short recipientRaftVersion)
    • InstallSnapshot

      public InstallSnapshot(long term, String leaderId, long lastIncludedIndex, long lastIncludedTerm, byte[] data, int chunkIndex, int totalChunks)
  • Method Details

    • getLeaderId

      public String getLeaderId()
    • getLastIncludedIndex

      public long getLastIncludedIndex()
    • getLastIncludedTerm

      public long getLastIncludedTerm()
    • getData

      public byte[] getData()
    • compression

      public @Nullable CompressionType compression()
      Return the compression format of getData(). Can only be called if chunkIndex == 0.
      Returns:
      the format of getData(), or null if not known
      Throws:
      IllegalStateException - if chunkIndex is not 0
    • getChunkIndex

      public int getChunkIndex()
    • getTotalChunks

      public int getTotalChunks()
    • getLastChunkHashCode

      public OptionalInt getLastChunkHashCode()
    • votingConfig

      public @Nullable VotingConfig votingConfig()