com.hazelcast.util
Interface MemoryInfoAccessor

All Known Implementing Classes:
RuntimeMemoryInfoAccessor

public interface MemoryInfoAccessor

Used for providing runtime memory information of Java virtual machine.

See Also:
Runtime, ManagementFactory.getMemoryMXBean()

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.
 

Method Detail

getTotalMemory

long getTotalMemory()
Returns total amount allocated memory in JVM in bytes.

Returns:
total memory allocated in bytes.
See Also:
Runtime.totalMemory()

getFreeMemory

long getFreeMemory()
Returns the amount of free memory in the JVM in bytes.

Returns:
free memory in bytes
See Also:
Runtime.freeMemory()

getMaxMemory

long getMaxMemory()
Returns the maximum amount of memory that the JVM will attempt to use in bytes.

Returns:
maximum memory in bytes.
See Also:
Runtime.maxMemory()


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