public static class LeaderRetrievalUtils.LeaderConnectionInfoListener extends Object implements LeaderRetrievalListener
| Constructor and Description |
|---|
LeaderConnectionInfoListener() |
| Modifier and Type | Method and Description |
|---|---|
CompletableFuture<LeaderConnectionInfo> |
getLeaderConnectionInfoFuture() |
void |
handleError(Exception exception)
This method is called by the
LeaderRetrievalService in case of an exception. |
void |
notifyLeaderAddress(String leaderAddress,
UUID leaderSessionID)
This method is called by the
LeaderRetrievalService when a new leader is elected. |
public CompletableFuture<LeaderConnectionInfo> getLeaderConnectionInfoFuture()
public void notifyLeaderAddress(String leaderAddress, UUID leaderSessionID)
LeaderRetrievalListenerLeaderRetrievalService when a new leader is elected.
If both arguments are null then it signals that leadership was revoked without a new leader having been elected.
notifyLeaderAddress in interface LeaderRetrievalListenerleaderAddress - The address of the new leaderleaderSessionID - The new leader session IDpublic void handleError(Exception exception)
LeaderRetrievalListenerLeaderRetrievalService in case of an exception. This
assures that the LeaderRetrievalListener is aware of any problems occurring in the
LeaderRetrievalService thread.handleError in interface LeaderRetrievalListenerCopyright © 2014–2022 The Apache Software Foundation. All rights reserved.