class TaskMigrationDescheduler {

    Map<String, DeschedulingResult> findRequestedJobOrTaskMigrations() {
        long now = clock.wallTime();

        Map<String, DeschedulingResult> result = new HashMap<>();
        tasksById.values().forEach(task -> {
            Job<?> job = jobsById.get(task.getJobId());
            Node instance = evacuatedAgentsAllocationTracker.getAgent(task);
            if (job != null && instance != null) {
                RelocationPredicates.checkIfRelocationRequired(job, task).ifPresent(reason -> {
                    if (evictionQuotaTracker.getSystemEvictionQuota() > 0 && canTerminate(task)) {
                        long quota = evictionQuotaTracker.getJobEvictionQuota(task.getJobId());
                        if (quota > 0) {
                            evictionQuotaTracker.consumeQuota(task.getJobId());
                            result.put(task.getId(), newDeschedulingResultForRequestedRelocation(now, task, instance, reason.getRight()));
                        }
                    }
                });
            }
        });
        return result;
    }

      TaskMigrationDescheduler(Map<String, TaskRelocationPlan> plannedAheadTaskRelocationPlans,
                             EvacuatedAgentsAllocationTracker evacuatedAgentsAllocationTracker,
                             EvictionQuotaTracker evictionQuotaTracker,
                             Map<String, Job<?>> jobsById,
                             Map<String, Task> tasksById,
                             TitusRuntime titusRuntime);

}