Interface SchedulingPolicy

  • All Known Implementing Classes:
    MinOccupancyFirstSchedulingPolicy
    Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @ThreadSafe
    @FunctionalInterface
    @DefaultImplementation(MinOccupancyFirstSchedulingPolicy.class)
    public interface SchedulingPolicy
    A function to select an executor from collection of available executors.
    • Method Detail

      • selectExecutor

        ExecutorRepresenter selectExecutor​(java.util.Collection<ExecutorRepresenter> executors,
                                           Task task)
        A function to select an executor from the specified collection of available executors.
        Parameters:
        executors - The collection of available executors. Implementations can assume that the collection is not empty.
        task - The task to schedule
        Returns:
        The selected executor. It must be a member of executors.