public class SettableLeaderRetrievalService extends Object implements LeaderRetrievalService
LeaderRetrievalService
implementation which directly forwards calls of
notifyListener to the listener.Constructor and Description |
---|
SettableLeaderRetrievalService() |
SettableLeaderRetrievalService(String leaderAddress,
UUID leaderSessionID) |
Modifier and Type | Method and Description |
---|---|
void |
notifyListener(String address,
UUID leaderSessionID) |
void |
start(LeaderRetrievalListener listener)
Starts the leader retrieval service with the given listener to listen for new leaders.
|
void |
stop()
Stops the leader retrieval service.
|
public void start(LeaderRetrievalListener listener) throws Exception
LeaderRetrievalService
start
in interface LeaderRetrievalService
listener
- The leader retrieval listener which will be notified about new leaders.Exception
public void stop() throws Exception
LeaderRetrievalService
stop
in interface LeaderRetrievalService
Exception
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.