code: public void shutdown() {
  		synchronized (globalLock) {
  			for (Instance i : allInstances) {
  				i.removeSlotListener();
  				i.cancelAndReleaseAllSlots();
  			}
  			allInstances.clear();
  			allInstancesByHost.clear();
  			instancesWithAvailableResources.clear();
  			taskQueue.clear();
  		}
  	}
docs: Shuts the scheduler down. After shut down no more tasks can be added to the scheduler.