Package org.jclouds.cloudstack.domain
Class AsyncJob<S>
java.lang.Object
org.jclouds.cloudstack.domain.AsyncJob<S>
Class AsyncJob
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
AsyncJob.Builder<T extends AsyncJob.Builder<T,
S>, S> static enum
Valid job result codesstatic enum
Valid async job statuses -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
AsyncJob
(String accountId, String cmd, Date created, String id, String instanceId, String instanceType, int progress, S result, AsyncJob.ResultCode resultCode, String resultType, AsyncJob.Status status, String userId, AsyncJobError error) -
Method Summary
-
Constructor Details
-
AsyncJob
@ConstructorProperties({"accountid","cmd","created","jobid","jobinstanceid","jobinstancetype","jobprocstatus","jobresult","jobresultcode","jobresulttype","jobstatus","userid","error"}) protected AsyncJob(@Nullable String accountId, @Nullable String cmd, @Nullable Date created, String id, @Nullable String instanceId, @Nullable String instanceType, int progress, @Nullable S result, @Nullable AsyncJob.ResultCode resultCode, @Nullable String resultType, @Nullable AsyncJob.Status status, @Nullable String userId, @Nullable AsyncJobError error)
-
-
Method Details
-
builder
-
toBuilder
-
getAccountId
- Returns:
- the account that executed the async command
-
getCmd
- Returns:
- the async command executed
-
getCreated
- Returns:
- the created date of the job
-
getId
- Returns:
- async job ID
-
getInstanceId
- Returns:
- the unique ID of the instance/entity object related to the job
-
getInstanceType
- Returns:
- the instance/entity object related to the job
-
getProgress
public int getProgress()- Returns:
- the progress information of the PENDING job
-
getResult
- Returns:
- the result reason
-
getResultCode
- Returns:
- the result code for the job
-
getResultType
- Returns:
- the result type
-
getStatus
- Returns:
- the current job status-should be 0 for PENDING
-
getUserId
- Returns:
- the user that executed the async command
-
getError
- Returns:
- the error related to this command, or null if no error or error not yet encountered.
-
hasFailed
public boolean hasFailed() -
hasSucceed
public boolean hasSucceed() -
hashCode
public int hashCode() -
equals
-
string
protected com.google.common.base.MoreObjects.ToStringHelper string() -
toString
-