Package org.onosproject.cluster
Class Leader
- java.lang.Object
- 
- org.onosproject.cluster.Leader
 
- 
 public class Leader extends Object Topic leader.Identified by the node identifierand a monotonically increasing term number. The term number is incremented by one every time a new node is elected as leader. Also available is the system clock time at the instant when this node was elected as leader. Keep in mind though that as with any system clock based time stamps this particular information susceptible to clock skew and should only be relied on for simple diagnostic purposes.
- 
- 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object other)inthashCode()NodeIdnodeId()Returns the identifier for of leader.longterm()Returns the leader's term.longtermStartTime()Returns the system time when the current leadership term started.StringtoString()
 
- 
- 
- 
Constructor Detail- 
Leaderpublic Leader(NodeId nodeId, long term, long termStartTime) 
 
- 
 - 
Method Detail- 
nodeIdpublic NodeId nodeId() Returns the identifier for of leader.- Returns:
- node identifier
 
 - 
termpublic long term() Returns the leader's term.- Returns:
- leader term
 
 - 
termStartTimepublic long termStartTime() Returns the system time when the current leadership term started.- Returns:
- current leader term start time
 
 
- 
 
-