com.hazelcast.util

## Class RuntimeMemoryInfoAccessor

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

- All Implemented Interfaces:
    MemoryInfoAccessor

      public class RuntimeMemoryInfoAccessor
      extends Object
      implements MemoryInfoAccessor

  Provides memory information using `Runtime`.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `RuntimeMemoryInfoAccessor()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `long` | `getFreeMemory()` Returns the amount of free memory in the Java virtual machine in bytes.
    `long` | `getMaxMemory()` Returns the maximum amount of memory that the Java virtual machine will attempt to use in bytes.
    `long` | `getTotalMemory()` Returns total amount allocated memory in the Java virtual machine in bytes.

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

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

- - ### Constructor Detail

    - #### RuntimeMemoryInfoAccessor

          public RuntimeMemoryInfoAccessor()

  - ### Method Detail

    - #### getTotalMemory

          public long getTotalMemory()

      Description copied from interface: `MemoryInfoAccessor`
      Returns total amount allocated memory in the Java virtual machine in bytes.
      Specified by:
        `getTotalMemory` in interface `MemoryInfoAccessor`
      Returns:
        total memory allocated in bytes.
      See Also:
        `Runtime.totalMemory()`

    - #### getFreeMemory

          public long getFreeMemory()

      Description copied from interface: `MemoryInfoAccessor`
      Returns the amount of free memory in the Java virtual machine in bytes.
      Specified by:
        `getFreeMemory` in interface `MemoryInfoAccessor`
      Returns:
        free memory in bytes
      See Also:
        `Runtime.freeMemory()`

    - #### getMaxMemory

          public long getMaxMemory()

      Description copied from interface: `MemoryInfoAccessor`
      Returns the maximum amount of memory that the Java virtual machine will attempt to use in bytes.
      Specified by:
        `getMaxMemory` in interface `MemoryInfoAccessor`
      Returns:
        maximum memory in bytes.
      See Also:
        `Runtime.maxMemory()`

Copyright © 2018. All rights reserved.