18,46 → 18,47 |
|
import javax.xml.bind.annotation.XmlElement; |
|
/* |
* Information about processors and memory |
/** |
* @author Brian Rosenberger, bru(at)brutex.de |
* |
*/ |
public class RuntimeInfoType { |
|
private final Runtime runtime = Runtime.getRuntime(); |
|
@XmlElement |
public int getAvailableProcessors() { |
return runtime.availableProcessors(); |
} |
|
@XmlElement |
public long getFreeMemory() { |
return runtime.freeMemory(); |
} |
|
@XmlElement |
public long getFreeMemoryMB() { |
return runtime.freeMemory() / 1024; |
} |
|
@XmlElement |
public long getMaxMemory() { |
return runtime.maxMemory(); |
} |
|
@XmlElement |
public long getMaxMemoryMB() { |
return runtime.maxMemory() / 1024; |
} |
|
@XmlElement |
public long getTotalMemory() { |
return runtime.totalMemory(); |
} |
|
@XmlElement |
public long getTotalMemoryMB() { |
return runtime.totalMemory() / 1024; |
} |
|
public class RuntimeInfoType |
{ |
private final Runtime runtime = Runtime.getRuntime(); |
|
@XmlElement |
public int getAvailableProcessors() { |
return this.runtime.availableProcessors(); |
} |
|
@XmlElement |
public long getFreeMemory() { |
return this.runtime.freeMemory(); |
} |
|
@XmlElement |
public long getFreeMemoryMB() { |
return this.runtime.freeMemory() / 1024L; |
} |
|
@XmlElement |
public long getMaxMemory() { |
return this.runtime.maxMemory(); |
} |
|
@XmlElement |
public long getMaxMemoryMB() { |
return this.runtime.maxMemory() / 1024L; |
} |
|
@XmlElement |
public long getTotalMemory() { |
return this.runtime.totalMemory(); |
} |
|
@XmlElement |
public long getTotalMemoryMB() { |
return this.runtime.totalMemory() / 1024L; |
} |
} |