code: private void processNewlyAvailableInstances() {
  		synchronized (globalLock) {
  			Instance instance;
  
  			while ((instance = newlyAvailableInstances.poll()) != null) {
  				if (instance.hasResourcesAvailable()) {
  					instancesWithAvailableResources.put(instance.getTaskManagerID(), instance);
  				}
  			}
  		}
  	}
docs: --------------------------------------------------------------------------------------------