code: public Collection<CompletableFuture<TaskManagerLocation>> getPreferredLocationsBasedOnState() {
  		TaskManagerLocation priorLocation;
  		if (currentExecution.getTaskRestore() != null && (priorLocation = getLatestPriorLocation()) != null) {
  			return Collections.singleton(CompletableFuture.completedFuture(priorLocation));
  		}
  		else {
  			return null;
  		}
  	}
docs: Gets the preferred location to execute the current task execution attempt, based on the state
  that the execution attempt will resume.
  
  @return A size-one collection with the location preference, or null, if there is no
  location preference based on the state.