Class ExtendedRuntimeMXBeanImpl

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

public final class ExtendedRuntimeMXBeanImpl extends Object 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:
    • 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
    • getBootClassPath

      public final String getBootClassPath()
      If bootstrap class loading is supported by the virtual machine, returns a string containing the full bootstrap class path used by the boot class loader to locate and load class files.

      An indication of whether or not the virtual machine supports a boot class loader mechanism can be found from invoking the RuntimeMXBean.isBootClassPathSupported() method.

      Specified by:
      getBootClassPath in interface RuntimeMXBean
      Returns:
      the bootstrap classpath with each entry separated by the path separator character corresponding to the underlying operating system.
    • getClassPath

      public final String getClassPath()
      Returns the class path string used by the system class loader to locate and load class files. The value is identical to that which would be obtained from a call to System.getProperty(java.lang.String) supplying the value "java.class.path" for the key.
      Specified by:
      getClassPath in interface RuntimeMXBean
      Returns:
      the system classpath with each entry separated by the path separator character corresponding to the underlying operating system.
      See Also:
    • getLibraryPath

      public final String getLibraryPath()
      Returns the Java library path that will be used by the virtual machine to locate and load libraries. The value is identical to that which would be obtained from a call to System.getProperty(java.lang.String) supplying the value "java.library.path" for the key.
      Specified by:
      getLibraryPath in interface RuntimeMXBean
      Returns:
      the Java library path with each entry separated by the path separator character corresponding to the underlying operating system.
      See Also:
    • getManagementSpecVersion

      public final String getManagementSpecVersion()
      Returns a string containing the management interface specification version that the virtual machine meets.
      Specified by:
      getManagementSpecVersion in interface RuntimeMXBean
      Returns:
      the version of the management interface specification adhered to by the virtual machine.
    • getName

      public final String getName()
      Returns the string name of this virtual machine. This value may be different for each particular running virtual machine.
      Specified by:
      getName in interface RuntimeMXBean
      Returns:
      the name of this running virtual machine.
    • getSpecName

      public final String getSpecName()
      Returns the name of the Java virtual machine specification followed by this virtual machine. The value is identical to that which would be obtained from a call to System.getProperty(java.lang.String) supplying the value "java.vm.specification.name" for the key.
      Specified by:
      getSpecName in interface RuntimeMXBean
      Returns:
      the name of the Java virtual machine specification.
      See Also:
    • getSpecVendor

      public final String getSpecVendor()
      Returns the name of the Java virtual machine specification vendor. The value is identical to that which would be obtained from a call to System.getProperty(java.lang.String) supplying the value "java.vm.specification.vendor" for the key.
      Specified by:
      getSpecVendor in interface RuntimeMXBean
      Returns:
      the name of the Java virtual machine specification vendor.
      See Also:
    • getSpecVersion

      public final String getSpecVersion()
      Returns the name of the Java virtual machine specification version. The value is identical to that which would be obtained from a call to System.getProperty(java.lang.String) supplying the value "java.vm.specification.version" for the key.
      Specified by:
      getSpecVersion in interface RuntimeMXBean
      Returns:
      the Java virtual machine specification version.
      See Also:
    • getStartTime

      public final long getStartTime()
      Returns the time, in milliseconds, when the virtual machine was started.
      Specified by:
      getStartTime in interface RuntimeMXBean
      Returns:
      the virtual machine start time in milliseconds.
    • getUptime

      public final long getUptime()
      Returns the lifetime of the virtual machine in milliseconds.
      Specified by:
      getUptime in interface RuntimeMXBean
      Returns:
      the number of milliseconds the virtual machine has been running.
    • getVmName

      public final String getVmName()
      Returns the name of the Java virtual machine implementation. The value is identical to that which would be obtained from a call to System.getProperty(java.lang.String) supplying the value "java.vm.name" for the key.
      Specified by:
      getVmName in interface RuntimeMXBean
      Returns:
      the name of the Java virtual machine implementation.
      See Also:
    • getVmVendor

      public final String getVmVendor()
      Returns the name of the Java virtual machine implementation vendor. The value is identical to that which would be obtained from a call to System.getProperty(java.lang.String) supplying the value "java.vm.vendor" for the key.
      Specified by:
      getVmVendor in interface RuntimeMXBean
      Returns:
      the name of the Java virtual machine implementation vendor.
      See Also:
    • getVmVersion

      public final String getVmVersion()
      Returns the version of the Java virtual machine implementation. The value is identical to that which would be obtained from a call to System.getProperty(java.lang.String) supplying the value "java.vm.version" for the key.
      Specified by:
      getVmVersion in interface RuntimeMXBean
      Returns:
      the version of the Java virtual machine implementation.
      See Also:
    • isBootClassPathSupported

      public final boolean isBootClassPathSupported()
      Returns a boolean indication of whether or not the virtual machine supports a bootstrap class loading mechanism.
      Specified by:
      isBootClassPathSupported in interface RuntimeMXBean
      Returns:
      true if supported, false otherwise.
    • getInputArguments

      public final List<String> getInputArguments()
      Returns a list of all of the input arguments passed to the virtual machine on start-up. This will not include any input arguments that are passed into the application's main(String[] args) method.
      Specified by:
      getInputArguments in interface RuntimeMXBean
      Returns:
      a list of strings, each one containing an argument to the virtual machine. If no virtual machine arguments were passed in at start-up time then this will be an empty list.
    • getSystemProperties

      public final Map<String,String> getSystemProperties()
      Returns a map of the names and values of every system property known to the virtual machine.
      Specified by:
      getSystemProperties in interface RuntimeMXBean
      Returns:
      a map containing the names and values of every system property.
    • getObjectName

      public final ObjectName getObjectName()
      Returns an ObjectName instance representing the object name of this platform managed object.
      Specified by:
      getObjectName in interface PlatformManagedObject
      Returns:
      an ObjectName instance representing the object name of this platform managed object.