com.hazelcast.util

## Class OperatingSystemMXBeanSupport

- java.lang.Object
- - com.hazelcast.util.OperatingSystemMXBeanSupport

-     public final class OperatingSystemMXBeanSupport
      extends Object

  Support class for reading attributes from OperatingSystemMXBean.

- - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static double` | `getSystemLoadAverage()` Reads the system load average attribute from OperatingSystemMXBean.
    `static long` | `readLongAttribute(String attributeName, long defaultValue)` Reads a long attribute from OperatingSystemMXBean.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### readLongAttribute

          public static long readLongAttribute(String attributeName,
                                               long defaultValue)

      Reads a long attribute from OperatingSystemMXBean.
      Parameters:
        `attributeName` - name of the attribute
        `defaultValue` - default value if the attribute value is null
      Returns:
        value of the attribute

    - #### getSystemLoadAverage

          public static double getSystemLoadAverage()

      Reads the system load average attribute from OperatingSystemMXBean.
      Returns:
        system load average or negative value if metric is not available

Copyright © 2018. All rights reserved.