Class MinOccupancyFirstSchedulingPolicy

  • All Implemented Interfaces:
    SchedulingPolicy

    @ThreadSafe
    public final class MinOccupancyFirstSchedulingPolicy
    extends Object
    implements SchedulingPolicy
    This policy chooses a set of Executors, on which have minimum running Tasks.
    • Method Detail

      • selectExecutor

        public ExecutorRepresenter selectExecutor​(Collection<ExecutorRepresenter> executors,
                                                  Task task)
        Description copied from interface: SchedulingPolicy
        A function to select an executor from the specified collection of available executors.
        Specified by:
        selectExecutor in interface SchedulingPolicy
        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.