Class Snapshot
- java.lang.Object
-
- org.opendaylight.controller.cluster.raft.persisted.Snapshot
-
- All Implemented Interfaces:
Serializable
public class Snapshot extends Object implements Serializable
Represents a snapshot of the raft data.- Author:
- Thomas Pantelis
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
Snapshot.State
Implementations of this interface are used as the state payload for a snapshot.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Snapshot
create(Snapshot.State state, List<ReplicatedLogEntry> entries, long lastIndex, long lastTerm, long lastAppliedIndex, long lastAppliedTerm, long electionTerm, String electionVotedFor, ServerConfigurationPayload serverConfig)
long
getElectionTerm()
String
getElectionVotedFor()
long
getLastAppliedIndex()
long
getLastAppliedTerm()
long
getLastIndex()
long
getLastTerm()
ServerConfigurationPayload
getServerConfiguration()
Snapshot.State
getState()
List<ReplicatedLogEntry>
getUnAppliedEntries()
String
toString()
-
-
-
Method Detail
-
create
public static Snapshot create(Snapshot.State state, List<ReplicatedLogEntry> entries, long lastIndex, long lastTerm, long lastAppliedIndex, long lastAppliedTerm, long electionTerm, String electionVotedFor, ServerConfigurationPayload serverConfig)
-
getState
public Snapshot.State getState()
-
getUnAppliedEntries
public List<ReplicatedLogEntry> getUnAppliedEntries()
-
getLastTerm
public long getLastTerm()
-
getLastAppliedIndex
public long getLastAppliedIndex()
-
getLastAppliedTerm
public long getLastAppliedTerm()
-
getLastIndex
public long getLastIndex()
-
getElectionTerm
public long getElectionTerm()
-
getElectionVotedFor
public String getElectionVotedFor()
-
getServerConfiguration
public ServerConfigurationPayload getServerConfiguration()
-
-