Class Job

  • All Implemented Interfaces:
    java.io.Serializable

    public class Job
    extends CommonDTO
    Read only data transfer object representing a Job in the Genie system.
    Since:
    3.0.0
    See Also:
    Serialized Form
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  Job.Builder
      A builder to create jobs.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected Job​(@Valid Job.Builder builder)
      Constructor used by the builder.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Optional<java.lang.String> getArchiveLocation()
      Get the archive location for the job if there is one.
      java.util.Optional<java.lang.String> getClusterName()
      Get the name of the cluster running the job if there currently is one.
      java.util.Optional<java.lang.String> getCommandArgs()
      Get the arguments to be put on the command line along with the command executable.
      java.util.Optional<java.lang.String> getCommandName()
      Get the name of the command running this job if there currently is one.
      java.util.Optional<java.time.Instant> getFinished()
      Get the time the job finished.
      java.util.Optional<java.lang.String> getGrouping()
      Get the grouping for this job if there currently is one.
      java.util.Optional<java.lang.String> getGroupingInstance()
      Get the grouping instance for this job if there currently is one.
      java.util.Optional<java.time.Instant> getStarted()
      Get the time the job started.
      java.util.Optional<java.lang.String> getStatusMsg()
      Get the current status message.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Job

        protected Job​(@Valid
                      @Valid Job.Builder builder)
        Constructor used by the builder.
        Parameters:
        builder - The builder to use
    • Method Detail

      • getCommandArgs

        public java.util.Optional<java.lang.String> getCommandArgs()
        Get the arguments to be put on the command line along with the command executable.
        Returns:
        The command arguments
      • getStatusMsg

        public java.util.Optional<java.lang.String> getStatusMsg()
        Get the current status message.
        Returns:
        The status message as an optional
      • getArchiveLocation

        public java.util.Optional<java.lang.String> getArchiveLocation()
        Get the archive location for the job if there is one.
        Returns:
        The archive location
      • getClusterName

        public java.util.Optional<java.lang.String> getClusterName()
        Get the name of the cluster running the job if there currently is one.
        Returns:
        The name of the cluster where the job is running
      • getCommandName

        public java.util.Optional<java.lang.String> getCommandName()
        Get the name of the command running this job if there currently is one.
        Returns:
        The name of the command
      • getGrouping

        public java.util.Optional<java.lang.String> getGrouping()
        Get the grouping for this job if there currently is one.
        Returns:
        The grouping
        Since:
        3.3.0
      • getGroupingInstance

        public java.util.Optional<java.lang.String> getGroupingInstance()
        Get the grouping instance for this job if there currently is one.
        Returns:
        The grouping instance
        Since:
        3.3.0
      • getStarted

        public java.util.Optional<java.time.Instant> getStarted()
        Get the time the job started.
        Returns:
        The started time or null if not set
      • getFinished

        public java.util.Optional<java.time.Instant> getFinished()
        Get the time the job finished.
        Returns:
        The finished time or null if not set