Package com.complexible.common.base
Class OSUtil
- java.lang.Object
-
- com.complexible.common.base.OSUtil
-
public final class OSUtil extends java.lang.Object
- Author:
- Evren Sirin
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
OSUtil.NativeMemoryUsage
Native memory usage info collected from OS.
-
Field Summary
Fields Modifier and Type Field Description static OSUtil.NativeMemoryUsage
ERROR
Constant instance with memory usages set to 0 that indicates no memory info was retrieved.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static OSUtil.NativeMemoryUsage
getNativeMemory()
Returns a string with information about native memory usage orERROR
if an error occurs.static java.lang.String
getNativeMemoryInfo()
Returns a string with information about native memory usage of "N/A" if an error occurs.static long
getPID()
Returns the process ID for the JVM or -1 if the process ID cannot be determined.
-
-
-
Field Detail
-
ERROR
public static final OSUtil.NativeMemoryUsage ERROR
Constant instance with memory usages set to 0 that indicates no memory info was retrieved.
-
-
Method Detail
-
getNativeMemory
public static OSUtil.NativeMemoryUsage getNativeMemory()
Returns a string with information about native memory usage orERROR
if an error occurs.
-
getNativeMemoryInfo
public static java.lang.String getNativeMemoryInfo()
Returns a string with information about native memory usage of "N/A" if an error occurs.
-
getPID
public static long getPID()
Returns the process ID for the JVM or -1 if the process ID cannot be determined.
-
-