-
- All Superinterfaces:
PlatformManagedObject
,RuntimeMXBean
- All Known Implementing Classes:
ExtendedRuntimeMXBeanImpl
public interface RuntimeMXBean extends RuntimeMXBean
The OpenJ9 extension interface for the runtime system of the virtual machine.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
RuntimeMXBean.VMIdleStates
Defines the different states ofgetVMIdleState()
.
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description double
getCPULoad()
Returns a double value which holds the system load average calculated for the minute preceding the call, where system load average is taken to mean the following:long
getProcessID()
Deprecated, for removal: This API element is subject to removal in a future version.As of Java 10.double
getVMGeneratedCPULoad()
Returns a system load average calculated over the minute preceding the call averaged over the number of CPU available to Java virtual machine process.String
getVmId()
This is provided for the benefit of applications which use attach API to load JVMTI agents into their own JVMs.RuntimeMXBean.VMIdleStates
getVMIdleState()
Returns current JVM Idle state.boolean
isAttachApiInitialized()
Query the state of the Attach API.boolean
isAttachApiTerminated()
Query the state of the Attach API.boolean
isVMIdle()
-
Methods declared in interface java.lang.management.PlatformManagedObject
getObjectName
-
Methods declared in interface java.lang.management.RuntimeMXBean
getBootClassPath, getClassPath, getInputArguments, getLibraryPath, getManagementSpecVersion, getName, getPid, getSpecName, getSpecVendor, getSpecVersion, getStartTime, getSystemProperties, getUptime, getVmName, getVmVendor, getVmVersion, isBootClassPathSupported
-
-
-
-
Method Detail
-
getCPULoad
double getCPULoad()
Returns a double value which holds the system load average calculated for the minute preceding the call, where system load average is taken to mean the following:The time-averaged value of the sum of the number of runnable entities running on the available processors and the number of runnable entities ready and queued to run on the available processors. The averaging technique adopted can vary depending on the underlying operating system.
- Returns:
- normally, the system load average as a double. If the system load average is not obtainable (e.g. because the calculation may involve an unacceptable performance impact) then a negative value is returned.
- Since:
- 1.6
- See Also:
OperatingSystemMXBean.getSystemLoadAverage()
-
getProcessID
@Deprecated(forRemoval=true, since="10") long getProcessID()
Deprecated, for removal: This API element is subject to removal in a future version.As of Java 10. UsegetPid()
instead.Returns the native process identifier that identifies the current Java process to the operating system. The value is prone to being recycled over a period of time, as considered suitable by the operating system.- Returns:
- A long representing the process ID (pid) on the underlying operating system.
-
getVMGeneratedCPULoad
double getVMGeneratedCPULoad()
Returns a system load average calculated over the minute preceding the call averaged over the number of CPU available to Java virtual machine process.- Returns:
- A double indicating the average system load per processor. If the system load average is not available, it returns a negative value to indicate this.
-
getVMIdleState
RuntimeMXBean.VMIdleStates getVMIdleState()
Returns current JVM Idle state.- Returns:
- JVM idle state value - i.e active / idle
-
isVMIdle
boolean isVMIdle()
- Returns:
- true if JVM state is idle. Otherwise returns false
-
isAttachApiInitialized
boolean isAttachApiInitialized()
Query the state of the Attach API. Return false if the Attach API is: - still initializing - disabled - terminated by VM shutdown- Returns:
- true if Attach API is initialized
- Since:
- 1.8
-
isAttachApiTerminated
boolean isAttachApiTerminated()
Query the state of the Attach API. Return true if the Attach API is: - disabled - terminated by VM shutdown and false if it is - still initializing - initialized and running- Returns:
- true if Attach API is terminated
- Since:
- 1.8
-
getVmId
String getVmId()
This is provided for the benefit of applications which use attach API to load JVMTI agents into their own JVMs.- Returns:
- Attach API Virtual Machine ID of this VM
- Since:
- 1.8
-
-