Class EssJobImpl

java.lang.Object
com.appliedolap.essbase.AbstractEssObject
com.appliedolap.essbase.impl.EssJobImpl
All Implemented Interfaces:
EssJob, EssObject

public class EssJobImpl extends AbstractEssObject implements EssJob
Represents a server job, which is any number of different types of actions that have been performed on the server, such as a dimension build, data load, and others. See EssObject.Type for full list of known types.
  • Constructor Details

    • EssJobImpl

      public EssJobImpl(ApiContext api, EssServer server, com.appliedolap.essbase.client.model.JobRecordBean jobRecord)
  • Method Details

    • getJobID

      public Long getJobID()
      Description copied from interface: EssJob
      Gets the ID of the job.
      Specified by:
      getJobID in interface EssJob
      Returns:
      the numeric ID of this job
    • isSuccessful

      public boolean isSuccessful()
      Description copied from interface: EssJob
      Check if the job execution was successful.
      Specified by:
      isSuccessful in interface EssJob
      Returns:
      true if it was (as based on status code), false otherwise
    • getName

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

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

      public long getDuration()
      Description copied from interface: EssJob
      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.
      Specified by:
      getDuration in interface EssJob
      Returns:
      the duration of the job
    • getServer

      public EssServer getServer()
      Description copied from interface: EssJob
      Gets the owning server for this job.
      Specified by:
      getServer in interface EssJob
      Returns:
      the server for this job
    • getJobType

      public EssJob.JobType getJobType()
      Description copied from interface: EssJob
      Gets the type of the job.
      Specified by:
      getJobType in interface EssJob
      Returns:
      the job type
    • rerun

      public void rerun()
      Description copied from interface: EssJob
      Re-run the job (using the Essbase REST API method to re-run a job).
      Specified by:
      rerun in interface EssJob
    • getStatus

      public EssJob.Status getStatus()
      Description copied from interface: EssJob
      Gets the status of this job.
      Specified by:
      getStatus in interface EssJob
      Returns:
      the job status
    • getErrorMessage

      public String getErrorMessage()
      Description copied from interface: EssJob
      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.
      Specified by:
      getErrorMessage in interface EssJob
      Returns:
      the error message, if any
    • getDescription

      public String getDescription()
      Description copied from interface: EssJob
      A textual description of the job.
      Specified by:
      getDescription in interface EssJob
      Returns:
      a slightly longer description of the job
    • waitForCompletion

      public EssJob waitForCompletion() throws InterruptedException
      Description copied from interface: EssJob
      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 EssJob.waitForCompletion(long, TimeUnit).
      Specified by:
      waitForCompletion in interface EssJob
      Returns:
      the updated job object, once this job is complete
      Throws:
      InterruptedException - if interruption is thrown
    • waitForCompletion

      public EssJob waitForCompletion(long duration, TimeUnit timeUnit) throws InterruptedException
      Description copied from interface: EssJob
      Waits given amount of time for job to complete. See EssJob.waitForCompletion() for more details.
      Specified by:
      waitForCompletion in interface EssJob
      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