public class JobAgentInfo extends Object
JobAgentConnection.getInfo(boolean)
Modifier and Type | Field and Description |
---|---|
private Integer |
cpuUsage |
private long |
created |
private Set<JobInfo> |
jobs |
private Boolean |
paused |
private Long |
totalMemory |
private Long |
usedMemory |
Constructor and Description |
---|
JobAgentInfo()
Create a new info object and set all values to null.
|
JobAgentInfo(Boolean paused,
Integer cpuUsage,
Long usedMemory,
Long totalMemory,
Set<JobInfo> jobs)
Create a new info object.
|
JobAgentInfo(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.
|
Integer |
getCpuUsage()
Get the CPU usage in percent.
|
Set<JobInfo> |
getJobInfo()
Get detailed information about the running jobs.
|
Long |
getTotalMemory()
Get the total memory on the job agent's server in bytes.
|
Long |
getUsedMemory()
Get the used memory on the job agent's server in bytes.
|
private String |
getValue(Map<String,List<String>> headers,
String header) |
private List<String> |
getValues(Map<String,List<String>> headers,
String header) |
Boolean |
isPaused()
If the job agent is paused or running.
|
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 Boolean paused
private final Integer cpuUsage
private final Long usedMemory
private final Long totalMemory
public JobAgentInfo()
public JobAgentInfo(Boolean paused, Integer cpuUsage, Long usedMemory, Long totalMemory, 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(String answer)
JobAgentConnection
to get the values.answer
- The answer from info
request to the job agentpublic long getAge()
public Boolean isPaused()
public Integer getCpuUsage()
public Long getTotalMemory()
public Long getUsedMemory()
public Set<JobInfo> getJobInfo()
public String toString()
JobAgentConnection
object.