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