Interface Scheduler

  • All Known Implementing Classes:
    AbstractQueueScheduler, FIFOScheduler, LazyScheduler, PriorityQueueScheduler

    public interface Scheduler
    This interface represents only the most basic of a scheduler. It imposes no restrictions or particular details on the the type of queue, and allows for different future types to be returned.
    Author:
    Maksim Tkachenko, Ween Jiann Lee
    • Method Detail

      • add

        void add​(@NotNull
                 @NotNull Request r,
                 @NotNull
                 @NotNull Handler h,
                 Priority p,
                 Priority pf)
        Adds a request to the queue.

        This request would be parsed by the handler specified, and its priority can be downgraded to a minimum priority specified.

        Parameters:
        r - request to fetch when dequeued
        h - handler to be used to parse the request
        p - initial priority of the request
        pf - the minimum (floor) priority of this request
      • add

        void add​(@NotNull
                 @NotNull Request r,
                 @NotNull
                 @NotNull Handler h,
                 Priority p)
        Adds a request to the queue.

        This request would be parsed by the handler specified, and its priority can be downgraded to the default minimum priority.

        Parameters:
        r - request to fetch when dequeued
        h - handler to be used to parse the request
        p - initial priority of the request
      • add

        void add​(@NotNull
                 @NotNull Request r,
                 @NotNull
                 @NotNull Handler h)
        Adds a request to the queue.

        This request would be parsed by the handler specified, and it's initialised with default priority that can be downgraded to the default minimum priority.

        Parameters:
        r - request to fetch when dequeued
        h - handler to be used to parse the request
      • add

        void add​(@NotNull
                 @NotNull Request r,
                 Priority p,
                 Priority pf)
        Adds a request to the queue.

        This request would be parsed by a handler defined in Router or otherwise, and its priority can be downgraded to a minimum priority specified.

        Parameters:
        r - request to fetch when dequeued
        p - initial priority of the request
        pf - the minimum (floor) priority of this request
      • add

        void add​(@NotNull
                 @NotNull Request r,
                 Priority p)
        Adds a request to the queue.

        This request would be parsed by a handler defined in Router or otherwise defined, and its priority can be downgraded to the default minimum priority.

        Parameters:
        r - request to fetch when dequeued
        p - initial priority of the request
      • add

        void add​(@NotNull
                 @NotNull Request r)
        Adds a request to the queue.

        This request would be parsed by a handler defined in Router or otherwise defined, and it's initialised with default priority that can be downgraded to the default minimum priority.

        Parameters:
        r - request to fetch when dequeued