Enum JobStatus

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<JobStatus>

    public enum JobStatus
    extends java.lang.Enum<JobStatus>
    Possible statuses for a Job.
    Since:
    4.0.0
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      ACCEPTED
      The job has been accepted by the system via the REST API.
      CLAIMED
      The job has been claimed by a running agent.
      FAILED
      Job failed.
      INIT
      Job has been initialized, but not running yet.
      INVALID
      Job cannot be run due to invalid criteria.
      KILLED
      Job has been killed.
      RESERVED
      The id of the job has been reserved.
      RESOLVED
      The job specification has been resolved.
      RUNNING
      Job is now running.
      SUCCEEDED
      Job has finished executing, and is successful.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.Set<JobStatus> getActiveStatuses()
      Get an unmodifiable set of all the statuses that make up a job being considered active.
      static java.util.Set<JobStatus> getClaimableStatuses()
      Get an unmodifiable set of all the statuses from which a job can be marked claimed.
      static java.util.Set<JobStatus> getFinishedStatuses()
      Get an unmodifiable set of all the statuses that make up a job being considered finished.
      static java.util.Set<JobStatus> getResolvableStatuses()
      Get an unmodifiable set of all the statuses from which a job can be marked resolved.
      static java.util.Set<JobStatus> getStatusesBeforeClaimed()
      Get an unmodifiable set of all the statuses that come before CLAIMED.
      boolean isFinished()
      Check whether the job is no longer running.
      static JobStatus valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static JobStatus[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • RESERVED

        public static final JobStatus RESERVED
        The id of the job has been reserved.
      • RESOLVED

        public static final JobStatus RESOLVED
        The job specification has been resolved.
      • ACCEPTED

        public static final JobStatus ACCEPTED
        The job has been accepted by the system via the REST API.
      • CLAIMED

        public static final JobStatus CLAIMED
        The job has been claimed by a running agent.
      • INIT

        public static final JobStatus INIT
        Job has been initialized, but not running yet.
      • RUNNING

        public static final JobStatus RUNNING
        Job is now running.
      • SUCCEEDED

        public static final JobStatus SUCCEEDED
        Job has finished executing, and is successful.
      • KILLED

        public static final JobStatus KILLED
        Job has been killed.
      • FAILED

        public static final JobStatus FAILED
        Job failed.
      • INVALID

        public static final JobStatus INVALID
        Job cannot be run due to invalid criteria.
    • Method Detail

      • values

        public static JobStatus[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (JobStatus c : JobStatus.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static JobStatus valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • getActiveStatuses

        public static java.util.Set<JobStatus> getActiveStatuses()
        Get an unmodifiable set of all the statuses that make up a job being considered active.
        Returns:
        Unmodifiable set of all active statuses
      • getStatusesBeforeClaimed

        public static java.util.Set<JobStatus> getStatusesBeforeClaimed()
        Get an unmodifiable set of all the statuses that come before CLAIMED.
        Returns:
        Unmodifiable set of all statuses
      • getFinishedStatuses

        public static java.util.Set<JobStatus> getFinishedStatuses()
        Get an unmodifiable set of all the statuses that make up a job being considered finished.
        Returns:
        Unmodifiable set of all finished statuses
      • getResolvableStatuses

        public static java.util.Set<JobStatus> getResolvableStatuses()
        Get an unmodifiable set of all the statuses from which a job can be marked resolved.
        Returns:
        Unmodifiable set of all resolvable statuses
      • getClaimableStatuses

        public static java.util.Set<JobStatus> getClaimableStatuses()
        Get an unmodifiable set of all the statuses from which a job can be marked claimed.
        Returns:
        Unmodifiable set of all claimable statuses
      • isFinished

        public boolean isFinished()
        Check whether the job is no longer running.
        Returns:
        True if the job is no longer processing for one reason or another.