Interface EssJob

All Superinterfaces:
EssObject
All Known Implementing Classes:
EssJobImpl

public interface EssJob extends EssObject
  • Method Details

    • getJobID

      Long getJobID()
      Gets the ID of the job.
      Returns:
      the numeric ID of this job
    • isSuccessful

      boolean isSuccessful()
      Check if the job execution was successful.
      Returns:
      true if it was (as based on status code), false otherwise
    • getName

      String getName()
      Implemented for conformance to AbstractEssObject; the name is simply the job ID.
      Specified by:
      getName in interface EssObject
      Returns:
      the name of this job
    • getType

      EssObject.Type getType()
      Description copied from interface: EssObject
      Gets the type of this object.
      Specified by:
      getType in interface EssObject
      Returns:
      the object type
    • getDuration

      long getDuration()
      Gets the duration of this job, in milliseconds. This method may return 0 while the job is executing and only have a useful value upon completion.
      Returns:
      the duration of the job
    • getServer

      EssServer getServer()
      Gets the owning server for this job.
      Returns:
      the server for this job
    • getJobType

      EssJob.JobType getJobType()
      Gets the type of the job.
      Returns:
      the job type
    • rerun

      void rerun()
      Re-run the job (using the Essbase REST API method to re-run a job).
    • getStatus

      EssJob.Status getStatus()
      Gets the status of this job.
      Returns:
      the job status
    • getErrorMessage

      String getErrorMessage()
      Returns the error message for the job, if any. This API will likely change as the jobs API is filled out, since this status is null for successful jobs.
      Returns:
      the error message, if any
    • getDescription

      String getDescription()
      A textual description of the job.
      Returns:
      a slightly longer description of the job
    • waitForCompletion

      EssJob waitForCompletion() throws InterruptedException
      Loops while re-polling the job for its static to change to one that is complete (successfully or otherwise). The default wait interval is 5 seconds, although a custom interval can be specified by using waitForCompletion(long, TimeUnit).
      Returns:
      the updated job object, once this job is complete
      Throws:
      InterruptedException - if interruption is thrown
    • waitForCompletion

      EssJob waitForCompletion(long duration, TimeUnit timeUnit) throws InterruptedException
      Waits given amount of time for job to complete. See waitForCompletion() for more details.
      Parameters:
      duration - the duration
      timeUnit - the time unit of the duration
      Returns:
      the updated job object, once this job is complete
      Throws:
      InterruptedException - if interruption is thrown