code: @GuardedBy("lock")
  	private CompletableFuture<Void> shutDownResourceManagerComponents() {
  
  		final Collection<CompletableFuture<Void>> terminationFutures = new ArrayList<>(dispatcherResourceManagerComponents.size());
  
  		for (DispatcherResourceManagerComponent<?> dispatcherResourceManagerComponent : dispatcherResourceManagerComponents) {
  			terminationFutures.add(dispatcherResourceManagerComponent.closeAsync());
  		}
  
  		final FutureUtils.ConjunctFuture<Void> dispatcherTerminationFuture = FutureUtils.completeAll(terminationFutures);
  
  		return FutureUtils.runAfterwards(
  			dispatcherTerminationFuture,
  			() -> {
  				Exception exception = null;
  
  				synchronized (lock) {
  					if (resourceManagerLeaderRetriever != null) {
  						try {
  							resourceManagerLeaderRetriever.stop();
  						} catch (Exception e) {
  							exception = ExceptionUtils.firstOrSuppressed(e, exception);
  						}
  
  						resourceManagerLeaderRetriever = null;
  					}
  
  					if (dispatcherLeaderRetriever != null) {
  						try {
  							dispatcherLeaderRetriever.stop();
  						} catch (Exception e) {
  							exception = ExceptionUtils.firstOrSuppressed(e, exception);
  						}
  
  						dispatcherLeaderRetriever = null;
  					}
  
  					if (webMonitorLeaderRetrievalService != null) {
  						try {
  							webMonitorLeaderRetrievalService.stop();
  						} catch (Exception e) {
  							exception = ExceptionUtils.firstOrSuppressed(e, exception);
  						}
  
  						webMonitorLeaderRetrievalService = null;
  					}
  				}
  
  				if (exception != null) {
  					throw exception;
  				}
  			});
  	}
docs: ------------------------------------------------------------------------