Package com.appliedolap.essbase
Interface EssJob
- All Superinterfaces:
EssObject
- All Known Implementing Classes:
EssJobImpl
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumKnown job types.static enumModels the status of a job.Nested classes/interfaces inherited from interface com.appliedolap.essbase.EssObject
EssObject.Type -
Method Summary
Modifier and TypeMethodDescriptionA textual description of the job.longGets the duration of this job, in milliseconds.Returns the error message for the job, if any.getJobID()Gets the ID of the job.Gets the type of the job.getName()Implemented for conformance toAbstractEssObject; the name is simply the job ID.Gets the owning server for this job.Gets the status of this job.getType()Gets the type of this object.booleanCheck if the job execution was successful.voidrerun()Re-run the job (using the Essbase REST API method to re-run a job).Loops while re-polling the job for its static to change to one that is complete (successfully or otherwise).waitForCompletion(long duration, TimeUnit timeUnit) Waits given amount of time for job to complete.
-
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 toAbstractEssObject; the name is simply the job ID. -
getType
EssObject.Type getType()Description copied from interface:EssObjectGets the type of this object. -
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
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 usingwaitForCompletion(long, TimeUnit).- Returns:
- the updated job object, once this job is complete
- Throws:
InterruptedException- if interruption is thrown
-
waitForCompletion
Waits given amount of time for job to complete. SeewaitForCompletion()for more details.- Parameters:
duration- the durationtimeUnit- the time unit of the duration- Returns:
- the updated job object, once this job is complete
- Throws:
InterruptedException- if interruption is thrown
-