|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.wisc.ssec.mcidasv.util.GetMem
public class GetMem
Wrapper for OperatingSystemMXBean
Constructor Summary | |
---|---|
GetMem()
|
Method Summary | ||
---|---|---|
private
|
callMXBeanMethod(String methodName,
T defaultValue)
Call a method belonging to OperatingSystemMXBean and return
the result. |
|
static String |
getMemory()
Get total system memory and print it out--accounts for 32bit JRE limitation of 1.5GB. |
|
static void |
main(String[] args)
The main. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GetMem()
Method Detail |
---|
private <T> T callMXBeanMethod(String methodName, T defaultValue)
OperatingSystemMXBean
and return
the result.
T
- Type of the expected return and defaultValue
.methodName
- Name of the OperatingSystemMXBean
method to call. Cannot be null
or empty.defaultValue
- Value to return if the call to methodName
fails.
methodName
call, or defaultValue
.public static String getMemory() throws Exception
String
representation of the total amount of system
memory.
Exception
public static void main(String[] args)
args
- Ignored.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |