code: public void clear() throws Exception {
  		Exception exception = null;
  
  		for (JobLeaderIdListener listener: jobLeaderIdListeners.values()) {
  			try {
  				listener.stop();
  			} catch (Exception e) {
  				exception = ExceptionUtils.firstOrSuppressed(e, exception);
  			}
  		}
  
  		if (exception != null) {
  			ExceptionUtils.rethrowException(exception, "Could not properly stop the " +
  				JobLeaderIdService.class.getSimpleName() + '.');
  		}
  
  		jobLeaderIdListeners.clear();
  	}
docs: Stop and clear the currently registered job leader id listeners.
  
  @throws Exception which is thrown in case a retrieval service cannot be stopped properly