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 interface
Implementations of this interface are used as the state payload for a snapshot. -
Method Summary
Modifier and TypeMethodDescriptionstatic Snapshot
create
(@Nullable Snapshot.State state, List<LogEntry> entries, long lastIndex, long lastTerm, long lastAppliedIndex, long lastAppliedTerm, TermInfo termInfo, @Nullable VotingConfig serverConfig) long
long
long
long
@NonNull EntryInfo
last()
@NonNull EntryInfo
static Snapshot
ofRaft
(TermInfo termInfo, RaftSnapshot raftSnapshot, EntryMeta lastIncluded, @Nullable Snapshot.State state) static Snapshot
ofTermLeader
(@Nullable Snapshot.State state, EntryMeta lastIncluded, TermInfo termInfo, @Nullable VotingConfig serverConfig) @Nullable Snapshot.State
state()
@NonNull TermInfo
termInfo()
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
-