code: @Override
  	public void close() throws Exception {
  		synchronized (lock) {
  			if (!isShutDown()) {
  				// stop all job manager leader services
  				for (EmbeddedLeaderService service : jobManagerLeaderServices.values()) {
  					service.shutdown();
  				}
  				jobManagerLeaderServices.clear();
  
  				resourceManagerLeaderService.shutdown();
  
  				webMonitorLeaderService.shutdown();
  			}
  
  			super.close();
  		}
  	}
docs: ------------------------------------------------------------------------