Class Participant
- java.lang.Object
-
- org.apache.curator.framework.recipes.leader.Participant
-
public class Participant extends java.lang.ObjectDescribes a participant in a leadership selection
-
-
Constructor Summary
Constructors Constructor Description Participant(java.lang.String id, boolean leader)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)java.lang.StringgetId()Returns the ID set viaLeaderSelector.setId(String)inthashCode()booleanisLeader()Returns true if this participant is the current leaderjava.lang.StringtoString()
-
-
-
Method Detail
-
getId
public java.lang.String getId()
Returns the ID set viaLeaderSelector.setId(String)- Returns:
- id
-
isLeader
public boolean isLeader()
Returns true if this participant is the current leader- Returns:
- true/false
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-