Modifier and Type | Field and Description |
---|---|
private static boolean |
amd64 |
private static boolean |
ibmvendor |
private static String |
JVMVersion |
private static boolean |
linux |
private static org.slf4j.Logger |
LOG |
private OperatingSystemMXBean |
osMbean |
private static boolean |
windows |
Constructor and Description |
---|
JVM()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
long |
getFreeMemory() |
long |
getMaxFileDescriptorCount()
Get the number of the maximum file descriptors the system can use.
|
int |
getNumberOfRunningProcess()
Workaround to get the current number of process running.
|
long |
getOpenFileDescriptorCount()
Get the number of opened filed descriptor for the runtime jvm.
|
double |
getSystemLoadAverage() |
static boolean |
isAmd64()
Check if the arch is amd64;
|
static boolean |
isGZIPOutputStreamFinishBroken()
Check if the finish() method of GZIPOutputStream is broken
|
static boolean |
isLinux()
Check if the OS is linux.
|
static boolean |
isUnix()
Check if the OS is unix.
|
private Long |
runUnixMXBeanMethod(String mBeanMethodName)
Load the implementation of UnixOperatingSystemMXBean for Oracle jvm
and runs the desired method.
|
private static final org.slf4j.Logger LOG
private OperatingSystemMXBean osMbean
private static final boolean ibmvendor
private static final boolean windows
private static final boolean linux
private static final boolean amd64
private static final String JVMVersion
public JVM()
public static boolean isUnix()
public static boolean isLinux()
public static boolean isAmd64()
public static boolean isGZIPOutputStreamFinishBroken()
private Long runUnixMXBeanMethod(String mBeanMethodName)
mBeanMethodName
- : method to run from the interface UnixOperatingSystemMXBeanpublic long getOpenFileDescriptorCount()
public double getSystemLoadAverage()
public long getFreeMemory()
public int getNumberOfRunningProcess()
public long getMaxFileDescriptorCount()
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.