public class ClusterNodeDetails extends ClusterNode
Constructor and Description |
---|
ClusterNodeDetails()
Creates a new
ClusterNodeDetails . |
ClusterNodeDetails(int responseCode,
java.lang.String errorMessage)
Creates a new
ClusterNodeDetails specifying the response code and
an error message. |
ClusterNodeDetails(java.lang.String nodeName,
NodeType nodeType,
NodeState nodeState,
java.util.ArrayList<java.lang.Long> jobsQueued,
int engineCount)
Creates a new
ClusterNodeDetails specifying the node name, the node type,
the node state, and the jobs queued. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
int |
getEngineCount()
Get the number of execution engines running on a given node.
|
java.lang.String |
getErrorMessage()
Retrieves the error message from the server for the cluster node.
|
java.util.ArrayList<java.lang.Long> |
getJobsQueued()
Retrieves a list of queued jobs from the server.
|
int |
getResponseCode()
Retrieves the response code from the server for the cluster node.
|
int |
hashCode() |
void |
setEngineCount(int engineCount)
Set the number of execution engines running on a given node.
|
void |
setErrorMessage(java.lang.String errorMessage)
Sets the error message for the cluster node.
|
void |
setJobsQueued(java.util.ArrayList<java.lang.Long> jobsQueued)
Sets the list of queued jobs.
|
void |
setResponseCode(int responseCode)
Sets the state of the node.
|
void |
throwExceptionIfError()
Translates between the response code and corresponding exception thrown on the client.
|
getNodeName, getNodeState, getNodeType, setNodeName, setNodeState, setNodeType
public ClusterNodeDetails(int responseCode, java.lang.String errorMessage)
ClusterNodeDetails
specifying the response code and
an error message.responseCode
- An int
specifying the response code.errorMessage
- A string containing the error message.ClusterNodeList
,
ClusterNode
public ClusterNodeDetails(java.lang.String nodeName, NodeType nodeType, NodeState nodeState, java.util.ArrayList<java.lang.Long> jobsQueued, int engineCount)
ClusterNodeDetails
specifying the node name, the node type,
the node state, and the jobs queued.nodeName
- The name of the node.nodeType
- The type of node. Can be Manager or Worker.nodeState
- The state of the node. Can be Started or Stopped.jobsQueued
- An array of queued jobs.ClusterNodeList
,
ClusterNode
public ClusterNodeDetails()
ClusterNodeDetails
.ClusterNodeList
,
ClusterNode
public int getEngineCount()
public void setEngineCount(int engineCount)
engineCount
- The number of engines running on a node.public java.util.ArrayList<java.lang.Long> getJobsQueued()
ClusterNodeList
public void setJobsQueued(java.util.ArrayList<java.lang.Long> jobsQueued)
jobsQueued
- An array list containing the queued jobs.ClusterNodeList
public int getResponseCode()
int
representing the response code.ClusterNodeList
,
ResponseCodes
public void setResponseCode(int responseCode)
responseCode
- An int
response code.ClusterNodeList
,
ResponseCodes
public java.lang.String getErrorMessage()
ClusterNodeList
public void setErrorMessage(java.lang.String errorMessage)
errorMessage
- A string containing the error message.ClusterNodeList
public void throwExceptionIfError() throws NotAuthenticatedException, java.lang.IllegalArgumentException
JobDoesNotExistException
NotAuthenticatedException
java.lang.IllegalArgumentException
public boolean equals(java.lang.Object obj)
equals
in class ClusterNode
public int hashCode()
hashCode
in class ClusterNode