Package org.jclouds.cloudstack.domain
Class AsyncJob<S>
- java.lang.Object
-
- org.jclouds.cloudstack.domain.AsyncJob<S>
-
public class AsyncJob<S> extends Object
Class AsyncJob
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AsyncJob.Builder<T extends AsyncJob.Builder<T,S>,S>
static class
AsyncJob.ResultCode
Valid job result codesstatic class
AsyncJob.Status
Valid async job statuses
-
Constructor Summary
Constructors Modifier Constructor Description protected
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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <T> AsyncJob.Builder<?,T>
builder()
boolean
equals(Object obj)
String
getAccountId()
String
getCmd()
Date
getCreated()
AsyncJobError
getError()
String
getId()
String
getInstanceId()
String
getInstanceType()
int
getProgress()
S
getResult()
AsyncJob.ResultCode
getResultCode()
String
getResultType()
AsyncJob.Status
getStatus()
String
getUserId()
boolean
hasFailed()
int
hashCode()
boolean
hasSucceed()
protected com.google.common.base.MoreObjects.ToStringHelper
string()
AsyncJob.Builder
toBuilder()
String
toString()
-
-
-
Constructor Detail
-
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 Detail
-
builder
public static <T> AsyncJob.Builder<?,T> builder()
-
toBuilder
public AsyncJob.Builder toBuilder()
-
getAccountId
@Nullable public String getAccountId()
- Returns:
- the account that executed the async command
-
getId
public String getId()
- Returns:
- async job ID
-
getInstanceId
@Nullable public String getInstanceId()
- Returns:
- the unique ID of the instance/entity object related to the job
-
getInstanceType
@Nullable public String getInstanceType()
- Returns:
- the instance/entity object related to the job
-
getProgress
public int getProgress()
- Returns:
- the progress information of the PENDING job
-
getResultCode
@Nullable public AsyncJob.ResultCode getResultCode()
- Returns:
- the result code for the job
-
getStatus
@Nullable public AsyncJob.Status getStatus()
- Returns:
- the current job status-should be 0 for PENDING
-
getError
@Nullable public AsyncJobError 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()
-
string
protected com.google.common.base.MoreObjects.ToStringHelper string()
-
-