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
LeaderRetrievalServicestart in interface LeaderRetrievalServicelistener - The leader retrieval listener which will be notified about new leaders.Exceptionpublic void stop()
throws Exception
LeaderRetrievalServicestop in interface LeaderRetrievalServiceExceptionCopyright © 2014–2019 The Apache Software Foundation. All rights reserved.