SwarmSpecRaft

@Serializable
data class SwarmSpecRaft(val snapshotInterval: Int? = null, val keepOldSnapshots: Int? = null, val logEntriesForSlowFollowers: Int? = null, val electionTick: Int? = null, val heartbeatTick: Int? = null)

Raft configuration.

Parameters

snapshotInterval

The number of log entries between snapshots.

keepOldSnapshots

The number of snapshots to keep beyond the current snapshot.

logEntriesForSlowFollowers

The number of log entries to keep around to sync up slow followers after a snapshot is created.

electionTick

The number of ticks that a follower will wait for a message from the leader before becoming a candidate and starting an election. ElectionTick must be greater than HeartbeatTick. A tick currently defaults to one second, so these translate directly to seconds currently, but this is NOT guaranteed.

heartbeatTick

The number of ticks between heartbeats. Every HeartbeatTick ticks, the leader will send a heartbeat to the followers. A tick currently defaults to one second, so these translate directly to seconds currently, but this is NOT guaranteed.

Constructors

Link copied to clipboard
constructor(snapshotInterval: Int? = null, keepOldSnapshots: Int? = null, logEntriesForSlowFollowers: Int? = null, electionTick: Int? = null, heartbeatTick: Int? = null)

Properties

Link copied to clipboard
@SerialName(value = "ElectionTick")
val electionTick: Int?
Link copied to clipboard
@SerialName(value = "HeartbeatTick")
val heartbeatTick: Int?
Link copied to clipboard
@SerialName(value = "KeepOldSnapshots")
val keepOldSnapshots: Int?
Link copied to clipboard
@SerialName(value = "LogEntriesForSlowFollowers")
val logEntriesForSlowFollowers: Int?
Link copied to clipboard
@SerialName(value = "SnapshotInterval")
val snapshotInterval: Int?