Interface Job

  • All Superinterfaces:
    java.lang.Comparable<Job>
    All Known Implementing Classes:
    BasicJob

    public interface Job
    extends java.lang.Comparable<Job>
    This interface represents only the most basic of a job, to be placed in a scheduler or other forms.
    Author:
    Maksim Tkachenko, Ween Jiann Lee
    • Method Detail

      • getRequest

        @NotNull
        @NotNull Request getRequest()
        Get the request of this job.
        Returns:
        Request of the job.
      • getHandler

        @Nullable
        Handler getHandler()
        Get the handler to handle the response of the job.

        If handler is null, routed handler will be used to assign a handler to the response, based on its criteria.

        Returns:
        Handler for the response or null.
      • getPriority

        Priority getPriority()
        Get the current priority set for this job.
        Returns:
        the current priority of the job.
      • reQueue

        void reQueue()
        Remove any existing in queue, downgrades the priority and adds the job back into queue.
      • getTryCount

        int getTryCount()
        Get attempt number of this job.
        Returns:
        Attempt (try) count of the job.