public class ApiCommand extends Object
There are two types of commands: synchronous and asynchronous. Synchronous commands complete immediately, and their results are passed back in the returned command object after the execution of an API call. Outside of that returned object, there is no way to check the result of a synchronous command.
Asynchronous commands have unique non-negative IDs. They may still be running when the API call returns. Clients can check the status of such commands using the API.
Constructor and Description |
---|
ApiCommand() |
ApiCommand(Long id,
String name,
Date startTime,
Date endTime,
boolean active,
Boolean success,
String resultMessage,
String resultDataUrl,
ApiClusterRef clusterRef,
ApiServiceRef serviceRef,
ApiRoleRef roleRef,
ApiHostRef hostRef,
ApiCommandList children,
ApiCommand parent,
Boolean canRetry) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
Boolean |
getCanRetry()
If the command can be retried.
|
ApiCommandList |
getChildren()
List of child commands.
|
ApiClusterRef |
getClusterRef()
Reference to the cluster (for cluster commands only).
|
Date |
getEndTime()
The end time, if the command is finished.
|
ApiHostRef |
getHostRef()
Reference to the host (for host commands only).
|
Long |
getId()
The command ID.
|
String |
getName()
The command name.
|
ApiCommand |
getParent()
Reference to the parent command, if any.
|
String |
getResultDataUrl()
URL to the command's downloadable result data, if any exists.
|
String |
getResultMessage()
If the command is finished, the result message.
|
ApiRoleRef |
getRoleRef()
Reference to the role (for role commands only).
|
ApiServiceRef |
getServiceRef()
Reference to the service (for service commands only).
|
Date |
getStartTime()
The start time.
|
Boolean |
getSuccess()
If the command is finished, whether it was successful.
|
int |
hashCode() |
boolean |
isActive()
Whether the command is currently active.
|
Boolean |
isCanRetry()
Deprecated.
Use
getCanRetry() instead |
void |
setActive(boolean active) |
void |
setCanRetry(Boolean canRetry) |
void |
setChildren(ApiCommandList children) |
void |
setClusterRef(ApiClusterRef clusterRef) |
void |
setEndTime(Date endTime) |
void |
setHostRef(ApiHostRef hostRef) |
void |
setId(Long id) |
void |
setName(String name) |
void |
setParent(ApiCommand parent) |
void |
setResultDataUrl(String resultDataUrl) |
void |
setResultMessage(String resultMessage) |
void |
setRoleRef(ApiRoleRef roleRef) |
void |
setServiceRef(ApiServiceRef serviceRef) |
void |
setStartTime(Date startTime) |
void |
setSuccess(Boolean success) |
String |
toString() |
protected com.google.common.base.Objects.ToStringHelper |
toStringHelper() |
public ApiCommand()
public ApiCommand(Long id, String name, Date startTime, Date endTime, boolean active, Boolean success, String resultMessage, String resultDataUrl, ApiClusterRef clusterRef, ApiServiceRef serviceRef, ApiRoleRef roleRef, ApiHostRef hostRef, ApiCommandList children, ApiCommand parent, Boolean canRetry)
protected com.google.common.base.Objects.ToStringHelper toStringHelper()
public Long getId()
public void setId(Long id)
public String getName()
public void setName(String name)
public Date getStartTime()
public void setStartTime(Date startTime)
public Date getEndTime()
public void setEndTime(Date endTime)
public boolean isActive()
public void setActive(boolean active)
public Boolean getSuccess()
public void setSuccess(Boolean success)
public String getResultMessage()
public void setResultMessage(String resultMessage)
public String getResultDataUrl()
public void setResultDataUrl(String resultDataUrl)
public ApiClusterRef getClusterRef()
public void setClusterRef(ApiClusterRef clusterRef)
public ApiServiceRef getServiceRef()
public void setServiceRef(ApiServiceRef serviceRef)
public ApiRoleRef getRoleRef()
public void setRoleRef(ApiRoleRef roleRef)
public ApiHostRef getHostRef()
public void setHostRef(ApiHostRef hostRef)
public ApiCommand getParent()
public void setParent(ApiCommand parent)
public ApiCommandList getChildren()
The list contains only the summary view of the children.
public void setChildren(ApiCommandList children)
@Deprecated public Boolean isCanRetry()
getCanRetry()
insteadpublic Boolean getCanRetry()
public void setCanRetry(Boolean canRetry)
Copyright © Cloudera, Inc. Released under Apache License, Version 2.0.