com.hazelcast.util
Class RuntimeMemoryInfoAccessor

java.lang.Object
  extended by com.hazelcast.util.RuntimeMemoryInfoAccessor
All Implemented Interfaces:
MemoryInfoAccessor

public class RuntimeMemoryInfoAccessor
extends Object
implements MemoryInfoAccessor

Provides memory information using Runtime.


Constructor Summary
RuntimeMemoryInfoAccessor()
           
 
Method Summary
 long getFreeMemory()
          Returns the amount of free memory in the JVM in bytes.
 long getMaxMemory()
          Returns the maximum amount of memory that the JVM will attempt to use in bytes.
 long getTotalMemory()
          Returns total amount allocated memory in JVM 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 JVM 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 JVM 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 JVM will attempt to use in bytes.

Specified by:
getMaxMemory in interface MemoryInfoAccessor
Returns:
maximum memory in bytes.
See Also:
Runtime.maxMemory()


Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.