Class ExtendedRuntimeMXBeanImpl

java.lang.Object
com.ibm.java.lang.management.internal.RuntimeMXBeanImpl
com.ibm.lang.management.internal.ExtendedRuntimeMXBeanImpl
All Implemented Interfaces:
RuntimeMXBean, PlatformManagedObject, RuntimeMXBean

public final class ExtendedRuntimeMXBeanImpl extends com.ibm.java.lang.management.internal.RuntimeMXBeanImpl implements RuntimeMXBean
Runtime type for RuntimeMXBean.
Since:
1.5
  • Method Details

    • getInstance

      public static RuntimeMXBean getInstance()
      Singleton accessor method.
      Returns:
      the RuntimeMXBeanImpl singleton.
    • getCPULoad

      public 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.

      Specified by:
      getCPULoad in interface RuntimeMXBean
      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.
      See Also:
    • getProcessID

      @Deprecated(forRemoval=true, since="10") public long getProcessID()
      Deprecated, for removal: This API element is subject to removal in a future version.
      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.
      Specified by:
      getProcessID in interface RuntimeMXBean
      Returns:
      A long representing the process ID (pid) on the underlying operating system.
    • getVMGeneratedCPULoad

      public 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.
      Specified by:
      getVMGeneratedCPULoad in interface RuntimeMXBean
      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

      public RuntimeMXBean.VMIdleStates getVMIdleState()
      Returns current JVM Idle state.
      Specified by:
      getVMIdleState in interface RuntimeMXBean
      Returns:
      JVM idle state value - i.e active / idle
    • isVMIdle

      public boolean isVMIdle()
      Specified by:
      isVMIdle in interface RuntimeMXBean
      Returns:
      true if JVM state is idle. Otherwise returns false
    • isAttachApiInitialized

      public boolean isAttachApiInitialized()
      Description copied from interface: RuntimeMXBean
      Query the state of the Attach API. Return false if the Attach API is: - still initializing - disabled - terminated by VM shutdown
      Specified by:
      isAttachApiInitialized in interface RuntimeMXBean
      Returns:
      true if Attach API is initialized
    • isAttachApiTerminated

      public boolean isAttachApiTerminated()
      Description copied from interface: RuntimeMXBean
      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
      Specified by:
      isAttachApiTerminated in interface RuntimeMXBean
      Returns:
      true if Attach API is terminated
    • getVmId

      public String getVmId()
      Description copied from interface: RuntimeMXBean
      This is provided for the benefit of applications which use attach API to load JVMTI agents into their own JVMs.
      Specified by:
      getVmId in interface RuntimeMXBean
      Returns:
      Attach API Virtual Machine ID of this VM