Package

miniraft

state

Permalink

package state

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. state
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. case class AppendEntries[T](term: Term, leaderId: NodeId, prevLogIndex: LogIndex, prevLogTerm: Term, entries: List[LogEntry[T]], leaderCommit: LogIndex) extends RaftRequest with Product with Serializable

    Permalink

    term

    our (the leader's) term

    leaderId

    our (the leader's) id

    prevLogIndex

    the last known (or assumed) index as we know it. If the reciever replies w/ a non-success response, this index is decremented and retried

    prevLogTerm

    our previous log term

    entries

    the entries to append ... which are only non-empty if a previous AppendEntries request came back successfully

    leaderCommit

    our latest commit index

  2. case class AppendEntriesResponse(term: Term, success: Boolean, matchIndex: LogIndex) extends RaftResponse with Product with Serializable

    Permalink
  3. case class Candidate extends NodeRole with Product with Serializable

    Permalink
  4. case class ClusterPeer(matchIndex: LogIndex, nextIndex: LogIndex) extends Product with Serializable

    Permalink
  5. trait ClusterProtocol extends AnyRef

    Permalink

    Represents a view of the clusterto a RaftNode.

    Represents a view of the clusterto a RaftNode. This is passed in, allowing the RaftNode (whos responsibility is to maintain its own state) to communicate with the rest of the cluster and control its timeouts

  6. case class Leader(clusterViewByNodeId: Map[NodeId, ClusterPeer]) extends NodeRole with Product with Serializable

    Permalink
  7. trait Log[Command] extends AnyRef

    Permalink
  8. case class LogEntry[Command](term: Term, index: LogIndex, command: Command) extends Product with Serializable

    Permalink
  9. type LogIndex = Int

    Permalink
  10. type NodeId = String

    Permalink
  11. sealed trait NodeRole extends AnyRef

    Permalink
  12. trait PersistentState[T] extends AnyRef

    Permalink
  13. case class RaftConfig(config: Config) extends Product with Serializable

    Permalink
  14. trait RaftEndpoint[T] extends AnyRef

    Permalink

    A generic representatino of a raft node -- simply something which can respond to RaftRequest messages

  15. class RaftNode[T] extends AnyRef

    Permalink
  16. sealed trait RaftRequest extends AnyRef

    Permalink
  17. sealed trait RaftResponse extends AnyRef

    Permalink
  18. case class RaftState[T](role: NodeRole, persistentState: PersistentState[T]) extends Product with Serializable

    Permalink
  19. trait RaftTimer extends AnyRef

    Permalink
  20. case class RequestVote(term: Term, candidateId: NodeId, lastLogIndex: LogIndex, lastLogTerm: Term) extends RaftRequest with Product with Serializable

    Permalink

    TODO - add our latest commit (applied) index

    TODO - add our latest commit (applied) index

    lastLogIndex

    our latest log index

  21. case class RequestVoteResponse(term: Term, granted: Boolean) extends RaftResponse with Product with Serializable

    Permalink
  22. case class Term(t: Int) extends Ordered[Term] with Product with Serializable

    Permalink

Value Members

  1. object Candidate extends Serializable

    Permalink
  2. object ClusterPeer extends Serializable

    Permalink
  3. object ClusterProtocol

    Permalink
  4. object Follower extends NodeRole with Product with Serializable

    Permalink
  5. object Log

    Permalink
  6. object PersistentState

    Permalink
  7. object RaftCluster

    Permalink
  8. object RaftEndpoint

    Permalink
  9. object RaftNode

    Permalink
  10. object RaftState extends Serializable

    Permalink
  11. object RaftTimer

    Permalink
  12. def isMajority(n: Int, total: Int): Boolean

    Permalink
  13. package rest

    Permalink

Inherited from AnyRef

Inherited from Any

Ungrouped