Package org.apache.flink.runtime.util
Class LeaderRetrievalUtils.LeaderInformationListener
java.lang.Object
org.apache.flink.runtime.util.LeaderRetrievalUtils.LeaderInformationListener
- All Implemented Interfaces:
LeaderRetrievalListener
- Enclosing class:
- LeaderRetrievalUtils
public static class LeaderRetrievalUtils.LeaderInformationListener
extends Object
implements LeaderRetrievalListener
Helper class which is used by the retrieveLeaderInformation method to retrieve the leader's
rpc URL and the current leader session ID.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidhandleError(Exception exception) This method is called by theLeaderRetrievalServicein case of an exception.voidnotifyLeaderAddress(String leaderAddress, UUID leaderSessionID) This method is called by theLeaderRetrievalServicewhen a new leader is elected.
-
Constructor Details
-
LeaderInformationListener
public LeaderInformationListener()
-
-
Method Details
-
getLeaderInformationFuture
-
notifyLeaderAddress
Description copied from interface:LeaderRetrievalListenerThis method is called by theLeaderRetrievalServicewhen a new leader is elected.If both arguments are null then it signals that leadership was revoked without a new leader having been elected.
- Specified by:
notifyLeaderAddressin interfaceLeaderRetrievalListener- Parameters:
leaderAddress- The address of the new leaderleaderSessionID- The new leader session ID
-
handleError
Description copied from interface:LeaderRetrievalListenerThis method is called by theLeaderRetrievalServicein case of an exception. This assures that theLeaderRetrievalListeneris aware of any problems occurring in theLeaderRetrievalServicethread.- Specified by:
handleErrorin interfaceLeaderRetrievalListener
-