public class Participant extends Object
Constructor and Description |
---|
Participant(String id,
boolean leader) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
String |
getId()
Returns the ID set via
LeaderSelector.setId(String) |
int |
hashCode() |
boolean |
isLeader()
Returns true if this participant is the current leader
|
String |
toString() |
public Participant(String id, boolean leader)
id
- the IDleader
- true if the leaderpublic String getId()
LeaderSelector.setId(String)
public boolean isLeader()
Copyright © 2011–2023 The Apache Software Foundation. All rights reserved.