Package com.appliedolap.essbase.impl
Class EssJobImpl
java.lang.Object
com.appliedolap.essbase.AbstractEssObject
com.appliedolap.essbase.impl.EssJobImpl
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.-
Nested Class Summary
Nested classes/interfaces inherited from interface com.appliedolap.essbase.EssJob
EssJob.JobType, EssJob.StatusNested classes/interfaces inherited from interface com.appliedolap.essbase.EssObject
EssObject.Type -
Field Summary
Fields inherited from class com.appliedolap.essbase.AbstractEssObject
api -
Constructor Summary
ConstructorsConstructorDescriptionEssJobImpl(ApiContext api, EssServer server, com.appliedolap.essbase.client.model.JobRecordBean jobRecord) -
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.
-
Constructor Details
-
EssJobImpl
public EssJobImpl(ApiContext api, EssServer server, com.appliedolap.essbase.client.model.JobRecordBean jobRecord)
-
-
Method Details
-
getJobID
Description copied from interface:EssJobGets the ID of the job. -
isSuccessful
public boolean isSuccessful()Description copied from interface:EssJobCheck if the job execution was successful.- Specified by:
isSuccessfulin interfaceEssJob- Returns:
- true if it was (as based on status code), false otherwise
-
getName
Description copied from interface:EssJobImplemented for conformance toAbstractEssObject; the name is simply the job ID. -
getType
Description copied from interface:EssObjectGets the type of this object. -
getDuration
public long getDuration()Description copied from interface:EssJobGets 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:
getDurationin interfaceEssJob- Returns:
- the duration of the job
-
getServer
Description copied from interface:EssJobGets the owning server for this job. -
getJobType
Description copied from interface:EssJobGets the type of the job.- Specified by:
getJobTypein interfaceEssJob- Returns:
- the job type
-
rerun
public void rerun()Description copied from interface:EssJobRe-run the job (using the Essbase REST API method to re-run a job). -
getStatus
Description copied from interface:EssJobGets the status of this job. -
getErrorMessage
Description copied from interface:EssJobReturns 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:
getErrorMessagein interfaceEssJob- Returns:
- the error message, if any
-
getDescription
Description copied from interface:EssJobA textual description of the job.- Specified by:
getDescriptionin interfaceEssJob- Returns:
- a slightly longer description of the job
-
waitForCompletion
Description copied from interface:EssJobLoops 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 usingEssJob.waitForCompletion(long, TimeUnit).- Specified by:
waitForCompletionin interfaceEssJob- Returns:
- the updated job object, once this job is complete
- Throws:
InterruptedException- if interruption is thrown
-
waitForCompletion
Description copied from interface:EssJobWaits given amount of time for job to complete. SeeEssJob.waitForCompletion()for more details.- Specified by:
waitForCompletionin interfaceEssJob- 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
-