Class/Object

com.github.trex_paxos.library

PaxosData

Related Docs: object PaxosData | package library

Permalink

case class PaxosData(progress: Progress, leaderHeartbeat: Long, timeout: Long, clusterSize: Int, prepareResponses: SortedMap[Identifier, Map[Int, PrepareResponse]] = PaxosData.emptyPrepares, epoch: Option[BallotNumber] = None, acceptResponses: SortedMap[Identifier, AcceptResponsesAndTimeout] = PaxosData.emptyAccepts, clientCommands: Map[Identifier, (CommandValue, String)] = Map.empty) extends Product with Serializable

This algebraic type holds the state of a node in the cluster.

progress

The highest promised and highest committed progress of a node in the cluster.

leaderHeartbeat

The last heartbeat value seen from a leader. Note that clocks are not synced so this value is only used as evidence that a stable leader is up whereas the paxos number and committed slot are taken as authoritative that a new leader is making progress.

timeout

The next randomised point in time that this node will timeout. Followers timeout on Commit messages and become a Recoverer. Recoverers timeout on PrepareResponses and AcceptResponses. Leaders timeout on AcceptResponses.

clusterSize

The current size of the cluster.

prepareResponses

The outstanding uncommitted proposed work of the leader take over phase during the recovery of a leader failover. Each key is an identifier of a prepare for which we are collecting a majority response to determine the highest proposed value of the previous leader if any.

epoch

The leaders paxos number when leading.

acceptResponses

Tracking of responses to accept messages when Recoverer or Leader. Each key is an identifier of the command we want to commit. Each value is a map of the ack/nacks of each cluster node with a timeout.

clientCommands

The client work outstanding with the leader. The map key is the accept identifier and the value is a tuple of the client command and the client ref.

Linear Supertypes
Serializable, Serializable, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. PaxosData
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyRef
  7. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Instance Constructors

  1. new PaxosData(progress: Progress, leaderHeartbeat: Long, timeout: Long, clusterSize: Int, prepareResponses: SortedMap[Identifier, Map[Int, PrepareResponse]] = PaxosData.emptyPrepares, epoch: Option[BallotNumber] = None, acceptResponses: SortedMap[Identifier, AcceptResponsesAndTimeout] = PaxosData.emptyAccepts, clientCommands: Map[Identifier, (CommandValue, String)] = Map.empty)

    Permalink

    progress

    The highest promised and highest committed progress of a node in the cluster.

    leaderHeartbeat

    The last heartbeat value seen from a leader. Note that clocks are not synced so this value is only used as evidence that a stable leader is up whereas the paxos number and committed slot are taken as authoritative that a new leader is making progress.

    timeout

    The next randomised point in time that this node will timeout. Followers timeout on Commit messages and become a Recoverer. Recoverers timeout on PrepareResponses and AcceptResponses. Leaders timeout on AcceptResponses.

    clusterSize

    The current size of the cluster.

    prepareResponses

    The outstanding uncommitted proposed work of the leader take over phase during the recovery of a leader failover. Each key is an identifier of a prepare for which we are collecting a majority response to determine the highest proposed value of the previous leader if any.

    epoch

    The leaders paxos number when leading.

    acceptResponses

    Tracking of responses to accept messages when Recoverer or Leader. Each key is an identifier of the command we want to commit. Each value is a map of the ack/nacks of each cluster node with a timeout.

    clientCommands

    The client work outstanding with the leader. The map key is the accept identifier and the value is a tuple of the client command and the client ref.

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. val acceptResponses: SortedMap[Identifier, AcceptResponsesAndTimeout]

    Permalink

    Tracking of responses to accept messages when Recoverer or Leader.

    Tracking of responses to accept messages when Recoverer or Leader. Each key is an identifier of the command we want to commit. Each value is a map of the ack/nacks of each cluster node with a timeout.

  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. val clientCommands: Map[Identifier, (CommandValue, String)]

    Permalink

    The client work outstanding with the leader.

    The client work outstanding with the leader. The map key is the accept identifier and the value is a tuple of the client command and the client ref.

  7. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. val clusterSize: Int

    Permalink

    The current size of the cluster.

  9. val epoch: Option[BallotNumber]

    Permalink

    The leaders paxos number when leading.

  10. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  11. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  12. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  13. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  14. val leaderHeartbeat: Long

    Permalink

    The last heartbeat value seen from a leader.

    The last heartbeat value seen from a leader. Note that clocks are not synced so this value is only used as evidence that a stable leader is up whereas the paxos number and committed slot are taken as authoritative that a new leader is making progress.

  15. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  16. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  17. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  18. val prepareResponses: SortedMap[Identifier, Map[Int, PrepareResponse]]

    Permalink

    The outstanding uncommitted proposed work of the leader take over phase during the recovery of a leader failover.

    The outstanding uncommitted proposed work of the leader take over phase during the recovery of a leader failover. Each key is an identifier of a prepare for which we are collecting a majority response to determine the highest proposed value of the previous leader if any.

  19. val progress: Progress

    Permalink

    The highest promised and highest committed progress of a node in the cluster.

  20. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  21. val timeout: Long

    Permalink

    The next randomised point in time that this node will timeout.

    The next randomised point in time that this node will timeout. Followers timeout on Commit messages and become a Recoverer. Recoverers timeout on PrepareResponses and AcceptResponses. Leaders timeout on AcceptResponses.

  22. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  24. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped