public Collection < CompletableFuture < TaskManagerLocation > > getPreferredLocationsBasedOnState ( ) { TaskManagerLocation priorLocation ; if ( currentExecution . getTaskRestore ( ) != null && ( priorLocation = getLatestPriorLocation ( ) ) != null ) { return Collections . singleton ( CompletableFuture . completedFuture ( priorLocation ) ) ; } else { return null ; } }
Gets the preferred location to execute the current task execution attempt based on the state that the execution attempt will resume .