java.lang.Object
org.opendaylight.controller.cluster.raft.persisted.Snapshot
All Implemented Interfaces:
Serializable

public final class Snapshot extends Object implements Serializable
Represents a snapshot of the raft data.
Author:
Thomas Pantelis
See Also:
  • Method Details

    • create

      @NonNullByDefault public static Snapshot create(@Nullable Snapshot.State state, List<LogEntry> entries, long lastIndex, long lastTerm, long lastAppliedIndex, long lastAppliedTerm, TermInfo termInfo, @Nullable VotingConfig serverConfig)
    • ofRaft

      @NonNullByDefault public static Snapshot ofRaft(TermInfo termInfo, RaftSnapshot raftSnapshot, EntryMeta lastIncluded, @Nullable Snapshot.State state)
    • ofTermLeader

      @NonNullByDefault public static Snapshot ofTermLeader(@Nullable Snapshot.State state, EntryMeta lastIncluded, TermInfo termInfo, @Nullable VotingConfig serverConfig)
    • state

      public @Nullable Snapshot.State state()
    • getUnAppliedEntries

      @NonNullByDefault public List<LogEntry> getUnAppliedEntries()
    • last

      public @NonNull EntryInfo last()
    • getLastIndex

      public long getLastIndex()
    • getLastTerm

      public long getLastTerm()
    • getLastAppliedIndex

      public long getLastAppliedIndex()
    • getLastAppliedTerm

      public long getLastAppliedTerm()
    • lastApplied

      public @NonNull EntryInfo lastApplied()
    • termInfo

      public @NonNull TermInfo termInfo()
    • votingConfig

      public @Nullable VotingConfig votingConfig()
    • toString

      public String toString()
      Overrides:
      toString in class Object