trait PersistentState extends AnyRef
Keeps track of a node's internal state: 1) what term it is 2) who the chuff it voted for
Linear Supertypes
Known Subclasses
Ordering
- Alphabetic
- By Inheritance
Inherited
- PersistentState
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- All
Abstract Value Members
-
abstract
def
castVote(term: Term, node: NodeId): Unit
- term
the term for which we're casting our vote
- node
the key of the cluster node for which we're voting
- abstract def currentTerm: Term
- abstract def currentTerm_=(term: Term): PersistentState
-
abstract
def
votedFor(term: Term): Option[String]
- returns
the recipient of the vote for the given term
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
cached(): PersistentState
convenience call to ensure the currentTerm calls are cached
convenience call to ensure the currentTerm calls are cached
- returns
a caching persistent state
-
def
castVote(latestAppendedLogEntry: ⇒ LogCoords, requestingNodeId: NodeId, forRequest: RequestVote): RequestVoteResponse
cast a vote given the request and optionally update our 'votedFor' state if it's the first time we've voted for the term
cast a vote given the request and optionally update our 'votedFor' state if it's the first time we've voted for the term
- requestingNodeId
the requesting node ID
- forRequest
the vote request to which we're asked to reply
- returns
the vote response
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hasAlreadyVotedInTerm(term: Term): Boolean
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )