public static class ConnectionUtils.LeaderConnectingAddressListener extends Object implements LeaderRetrievalListener
LeaderRetrievalListener that allows retrieving an InetAddress for the
current leader.| 构造器和说明 |
|---|
LeaderConnectingAddressListener(org.apache.flink.runtime.rpc.RpcSystemUtils rpcSystemUtils) |
| 限定符和类型 | 方法和说明 |
|---|---|
InetAddress |
findConnectingAddress(java.time.Duration timeout) |
InetAddress |
findConnectingAddress(java.time.Duration timeout,
java.time.Duration startLoggingAfter) |
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 LeaderConnectingAddressListener(org.apache.flink.runtime.rpc.RpcSystemUtils rpcSystemUtils)
public InetAddress findConnectingAddress(java.time.Duration timeout) throws LeaderRetrievalException
public InetAddress findConnectingAddress(java.time.Duration timeout, java.time.Duration startLoggingAfter) throws LeaderRetrievalException
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 在接口中 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 在接口中 LeaderRetrievalListenerCopyright © 2014–2023 The Apache Software Foundation. All rights reserved.