Interface LeaderRetrievalEventHandler
-
- All Known Implementing Classes:
DefaultLeaderRetrievalService
public interface LeaderRetrievalEventHandlerInterface which should be implemented to notify toLeaderInformationchanges inLeaderRetrievalDriver.Important: The
LeaderRetrievalDrivercould not guarantee that there is noLeaderRetrievalEventHandlercallbacks happen afterAutoCloseable.close(). This means that the implementor ofLeaderRetrievalEventHandleris responsible for filtering out spurious callbacks(e.g. after close has been called onLeaderRetrievalDriver).
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidnotifyLeaderAddress(LeaderInformation leaderInformation)Called by specificLeaderRetrievalDriverto notify leader address.
-
-
-
Method Detail
-
notifyLeaderAddress
void notifyLeaderAddress(LeaderInformation leaderInformation)
Called by specificLeaderRetrievalDriverto notify leader address.Duplicated leader change events could happen, so the implementation should check whether the passed leader information is truly changed with last stored leader information.
- Parameters:
leaderInformation- the new leader information to notifyLeaderRetrievalService. It could beLeaderInformation.empty()if the leader address does not exist in the external storage.
-
-