public final class DXJob extends DXExecution
Modifier and Type | Class and Description |
---|---|
static class |
DXJob.Describe
Contains metadata about a job.
|
static class |
DXJob.StateTransition
A event where a job transitioned from one state to another.
|
cachedDescribe
Modifier and Type | Method and Description |
---|---|
DXJob.Describe |
describe()
Obtains metadata about the execution.
|
DXJob.Describe |
getCachedDescribe()
Returns metadata about the data object, like
DXExecution.describe() , but without making an API
call. |
static DXJob |
getInstance(String jobId)
Returns a
DXJob representing the specified job. |
static DXJob |
getInstanceWithEnvironment(String jobId,
DXEnvironment env)
Returns a
DXJob representing the specified job using the specified environment. |
<T> T |
getOutput(Class<T> outputClass)
Returns the output of the execution, deserialized to the specified class.
|
void |
terminate()
Terminates the execution.
|
DXJob |
waitUntilDone()
Waits until the job has successfully completed and is in the DONE state.
|
checkCachedDescribeAvailable
apiCallOnObject, apiCallOnObject, equals, getId, hashCode, toString
public static DXJob getInstance(String jobId)
DXJob
representing the specified job.jobId
- Job ID, of the form "job-xxxx"
DXJob
NullPointerException
- If jobId
is nullpublic static DXJob getInstanceWithEnvironment(String jobId, DXEnvironment env)
DXJob
representing the specified job using the specified environment.jobId
- Job ID, of the form "job-xxxx"
env
- environment to use for making subsequent API callsDXJob
NullPointerException
- If jobId
or env
is nullpublic DXJob.Describe describe()
DXExecution
describe
in class DXExecution
Describe
containing execution metadatapublic DXJob.Describe getCachedDescribe()
DXExecution
DXExecution.describe()
, but without making an API
call.
This cached describe info is only available if this object appears in the result of a
DXSearch.findExecutions()
call that specified
DXSearch.FindExecutionsRequestBuilder.includeDescribeOutput()
. The describe info that
is returned reflects the state of the object at the time that the search was performed.
getCachedDescribe
in class DXExecution
Describe
containing the execution's metadatapublic <T> T getOutput(Class<T> outputClass) throws IllegalStateException
DXExecution
getOutput
in class DXExecution
outputClass
- class to deserialize toIllegalStateException
- if the execution is not in the DONE state.public void terminate()
DXExecution
terminate
in class DXExecution
public DXJob waitUntilDone() throws IllegalStateException
waitUntilDone
in class DXExecution
IllegalStateException
- if the job reaches the FAILED or TERMINATED stateCopyright © 2023. All Rights Reserved.