|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.basedb.util.jobagent.JobAgentInfo
public class JobAgentInfo
This class can hold information about the status of a job agent.
JobAgentConnection.getInfo(boolean)
Field Summary | |
---|---|
private Integer |
cpuUsage
|
private long |
created
|
private Set<JobInfo> |
jobs
|
private Boolean |
paused
|
private Long |
totalMemory
|
private Long |
usedMemory
|
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
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. |
Set<Integer> |
getJobs()
Deprecated. Use getJobInfo() instead |
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private final long created
private final Boolean paused
private final Integer cpuUsage
private final Long usedMemory
private final Long totalMemory
private final Set<JobInfo> jobs
Constructor Detail |
---|
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 agentMethod Detail |
---|
public long getAge()
public Boolean isPaused()
public Integer getCpuUsage()
public Long getTotalMemory()
public Long getUsedMemory()
public Set<Integer> getJobs()
getJobInfo()
instead
public Set<JobInfo> getJobInfo()
public String toString()
JobAgentConnection
object.
toString
in class Object
private String getValue(Map<String,List<String>> headers, String header)
private List<String> getValues(Map<String,List<String>> headers, String header)
|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |