Class Snapshot
java.lang.Object
org.opendaylight.controller.cluster.raft.persisted.Snapshot
- All Implemented Interfaces:
Serializable
Represents a snapshot of the raft data.
- Author:
- Thomas Pantelis
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceImplementations of this interface are used as the state payload for a snapshot. -
Method Summary
Modifier and TypeMethodDescriptionstatic Snapshotcreate(@Nullable Snapshot.State state, List<LogEntry> entries, long lastIndex, long lastTerm, long lastAppliedIndex, long lastAppliedTerm, TermInfo termInfo, @Nullable VotingConfig serverConfig) longlonglonglong@NonNull EntryInfolast()@NonNull EntryInfostatic SnapshotofRaft(TermInfo termInfo, RaftSnapshot raftSnapshot, EntryMeta lastIncluded, @Nullable Snapshot.State state) static SnapshotofTermLeader(@Nullable Snapshot.State state, EntryMeta lastIncluded, TermInfo termInfo, @Nullable VotingConfig serverConfig) @Nullable Snapshot.Statestate()@NonNull TermInfotermInfo()toString()@Nullable VotingConfig
-
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
-
getUnAppliedEntries
-
last
-
getLastIndex
public long getLastIndex() -
getLastTerm
public long getLastTerm() -
getLastAppliedIndex
public long getLastAppliedIndex() -
getLastAppliedTerm
public long getLastAppliedTerm() -
lastApplied
-
termInfo
-
votingConfig
-
toString
-