public void notifyListener(String address, UUID leaderSessionID) { this.leaderAddress = address; this.leaderSessionID = leaderSessionID; if (listener != null) { listener.notifyLeaderAddress(address, leaderSessionID); } }
@Override public void start(LeaderRetrievalListener listener) throws Exception { this.listener = Preconditions.checkNotNull(listener); if (leaderAddress != null) { listener.notifyLeaderAddress(leaderAddress, leaderSessionID); } }