public class LeaderElectionService extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
LeaderElectionService.LeaderListener
Interface which should be implemented by classes which are interested in the leader election.
|
| Constructor and Description |
|---|
LeaderElectionService(PulsarService pulsar,
LeaderElectionService.LeaderListener leaderListener) |
| Modifier and Type | Method and Description |
|---|---|
LeaderBroker |
getCurrentLeader() |
boolean |
isElected() |
boolean |
isLeader() |
void |
start() |
void |
stop() |
public LeaderElectionService(PulsarService pulsar, LeaderElectionService.LeaderListener leaderListener)
public void start()
public void stop()
public LeaderBroker getCurrentLeader()
public boolean isLeader()
public boolean isElected()
Copyright © 2017–2021 Apache Software Foundation. All rights reserved.