package raft
- Alphabetic
- By Inheritance
- raft
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
- final case class AppendOccurredOnDisconnectedLeader(originalAppend: LogAppendSuccess, newAppend: LogAppendSuccess) extends Exception with ClientError with Product with Serializable
-
final
case class
AppendStatus(leaderAppendResult: LogAppendSuccess, appended: Map[NodeId, AppendEntriesResponse], appendedCoords: Set[LogCoords], clusterSize: Int, committed: Set[LogCoords], errorAfterAppend: Option[Exception] = None) extends Product with Serializable
Represents the current state of the cluster following an append
Represents the current state of the cluster following an append
- appended
a map of the cluster ids to a flag indicating whether or not the node has appended the entry
- appendedCoords
the log coords which have been appended on the leader
- clusterSize
the size of the cluster
- committed
the coordinates of committed entries on the leader after quarum has ack'd
- errorAfterAppend
A means of letting observers know that a log append error has occurred, perhaps due to a leader change
- final case class AttemptToCommitMissingIndex(attemptedIndex: LogIndex) extends Exception with LogError with Product with Serializable
- final case class AttemptToOverwriteACommittedIndex(attemptedLogIndex: LogIndex, latestCommittedIndex: LogIndex) extends Exception with LogError with Product with Serializable
- trait ClientError extends Exception
- final case class LogAppendException[T](coords: LogCoords, data: T, err: Throwable) extends Exception with LogError with Product with Serializable
- final case class LogCommitException(coords: LogCoords, err: Throwable) extends Exception with LogError with Product with Serializable
- trait LogError extends Exception
- type LogIndex = Int
- type NodeId = String
-
trait
RaftClient[F[_], A] extends AnyRef
The external use-cases for a node in the Raft protocol are:
The external use-cases for a node in the Raft protocol are:
1) adding/removing nodes 2) appending data to the cluster, which should return either a new (pending) commit coords, a redirect, or a 'no known leader' 3) subscribing to lifecycle events, which should return a Publisher which lets subscribers know about cluster and leadership changes 4) subscribing to a commit log, which should return a Publisher which lets subscribers know when logs are appended or committed
All of these algebras don't necessarily have to be in the same trait
- type Term = Int
Value Members
- def isMajority(numberReceived: Int, clusterSize: Int): Boolean