Interface LeaderRetrievalListener
-
- All Known Implementing Classes:
ConnectionUtils.LeaderConnectingAddressListener,LeaderGatewayRetriever,LeaderRetrievalUtils.LeaderInformationListener,LeaderRetriever,RpcGatewayRetriever
public interface LeaderRetrievalListenerClasses which want to be notified about a changing leader by theLeaderRetrievalServicehave to implement this interface.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidhandleError(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.
-
-
-
Method Detail
-
notifyLeaderAddress
void notifyLeaderAddress(@Nullable String leaderAddress, @Nullable UUID leaderSessionID)This 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.
- Parameters:
leaderAddress- The address of the new leaderleaderSessionID- The new leader session ID
-
handleError
void handleError(Exception exception)
This method is called by theLeaderRetrievalServicein case of an exception. This assures that theLeaderRetrievalListeneris aware of any problems occurring in theLeaderRetrievalServicethread.- Parameters:
exception-
-
-