Interface TaskResourceUsageTrackers.TaskResourceUsageTracker.ResourceUsageBreachEvaluator
- Enclosing class:
TaskResourceUsageTrackers.TaskResourceUsageTracker
public static interface TaskResourceUsageTrackers.TaskResourceUsageTracker.ResourceUsageBreachEvaluator
This interface carries the logic to decide whether a task should be cancelled or not
-
Method Summary
Modifier and TypeMethodDescriptionevaluates whether the task is eligible for cancellation based onTaskResourceUsageTrackers.TaskResourceUsageTracker
implementation
-
Method Details
-
evaluate
evaluates whether the task is eligible for cancellation based onTaskResourceUsageTrackers.TaskResourceUsageTracker
implementation- Parameters:
task
- is input to this method on which the cancellation evaluation is performed- Returns:
- a
TaskCancellation.Reason
why this task should be cancelled otherwise empty
-