public class JobAgentInfo
extends java.lang.Object
JobAgentConnection.getInfo(boolean)
Modifier and Type | Field and Description |
---|---|
private java.lang.Integer |
cpuUsage |
private long |
created |
private java.util.Set<JobInfo> |
jobs |
private java.lang.Boolean |
paused |
private java.lang.Long |
totalMemory |
private java.lang.Long |
usedMemory |
Constructor and Description |
---|
JobAgentInfo()
Create a new info object and set all values to null.
|
JobAgentInfo(java.lang.Boolean paused,
java.lang.Integer cpuUsage,
java.lang.Long usedMemory,
java.lang.Long totalMemory,
java.util.Set<JobInfo> jobs)
Create a new info object.
|
JobAgentInfo(java.lang.String answer)
Create a new info object and parse the answer from a
JobAgentConnection
to get the values. |
Modifier and Type | Method and Description |
---|---|
long |
getAge()
Get the age in milliseconds of this object.
|
java.lang.Integer |
getCpuUsage()
Get the CPU usage in percent.
|
java.util.Set<JobInfo> |
getJobInfo()
Get detailed information about the running jobs.
|
java.lang.Long |
getTotalMemory()
Get the total memory on the job agent's server in bytes.
|
java.lang.Long |
getUsedMemory()
Get the used memory on the job agent's server in bytes.
|
private java.lang.String |
getValue(java.util.Map<java.lang.String,java.util.List<java.lang.String>> headers,
java.lang.String header) |
private java.util.List<java.lang.String> |
getValues(java.util.Map<java.lang.String,java.util.List<java.lang.String>> headers,
java.lang.String header) |
java.lang.Boolean |
isPaused()
If the job agent is paused or running.
|
java.lang.String |
toString()
Convert the information to a string that is suitable for sening as an
answer to a
JobAgentConnection object. |
private final long created
private final java.lang.Boolean paused
private final java.lang.Integer cpuUsage
private final java.lang.Long usedMemory
private final java.lang.Long totalMemory
private final java.util.Set<JobInfo> jobs
public JobAgentInfo()
public JobAgentInfo(java.lang.Boolean paused, java.lang.Integer cpuUsage, java.lang.Long usedMemory, java.lang.Long totalMemory, java.util.Set<JobInfo> jobs)
paused
- If the job agent is paused or running, or null if not knowcpuUsage
- The CPU usage in percent, or null if not knownusedMemory
- The used memory in bytes, or null if not knowntotalMemory
- The total memory in bytes, or null if not knownjobs
- Information about jobs that are currently executing or null if not knownpublic JobAgentInfo(java.lang.String answer)
JobAgentConnection
to get the values.answer
- The answer from info
request to the job agentpublic long getAge()
public java.lang.Boolean isPaused()
public java.lang.Integer getCpuUsage()
public java.lang.Long getTotalMemory()
public java.lang.Long getUsedMemory()
public java.util.Set<JobInfo> getJobInfo()
public java.lang.String toString()
JobAgentConnection
object.toString
in class java.lang.Object
private java.lang.String getValue(java.util.Map<java.lang.String,java.util.List<java.lang.String>> headers, java.lang.String header)
private java.util.List<java.lang.String> getValues(java.util.Map<java.lang.String,java.util.List<java.lang.String>> headers, java.lang.String header)