Package io.microraft.model.log
Interface SnapshotEntry
-
- All Superinterfaces:
BaseLogEntry
,RaftModel
,Serializable
public interface SnapshotEntry extends BaseLogEntry
Represents a snapshot in the Raft log.A snapshot entry is also placed on a Raft log index, just like a regular log entry, but instead of user-provided operations present in log entries, a snapshot entry contains objects that are returned from
StateMachine.takeSnapshot(long, Consumer)
. Additionally, a snapshot entry contains the committed Raft group member list along with its commit index at the time of the snapshot creation.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
SnapshotEntry.SnapshotEntryBuilder
The builder interface forSnapshotEntry
.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description RaftGroupMembersView
getGroupMembersView()
int
getSnapshotChunkCount()
static boolean
isNonInitial(SnapshotEntry snapshotEntry)
-
Methods inherited from interface io.microraft.model.log.BaseLogEntry
getIndex, getOperation, getTerm
-
-
-
-
Method Detail
-
isNonInitial
static boolean isNonInitial(@Nullable SnapshotEntry snapshotEntry)
-
getSnapshotChunkCount
int getSnapshotChunkCount()
-
getGroupMembersView
@Nonnull RaftGroupMembersView getGroupMembersView()
-
-