com.hazelcast.memory
Interface MemoryStats

All Known Subinterfaces:
LocalMemoryStats
All Known Implementing Classes:
DefaultMemoryStats, LocalMemoryStatsImpl

public interface MemoryStats

Memory statistics for the JVM which current HazelcastInstance belongs to.

Shows total physical/free OS memory, max/committed/used/free heap memory and max/committed/used/free native memory.

See Also:
GarbageCollectorStats

Method Summary
 long getCommittedHeap()
          Returns the amount of memory in bytes that is committed for the Java virtual machine to use.
 long getCommittedNativeMemory()
          Returns the amount of native memory in bytes that is committed for current HazelcastInstance to use.
 long getFreeHeap()
          Returns the amount of free memory in the JVM in bytes.
 long getFreeNativeMemory()
          Returns the amount of free native memory in current HazelcastInstance in bytes.
 long getFreePhysical()
          Returns free physical memory available in OS.
 GarbageCollectorStats getGCStats()
          Returns the garbage collector statistics for the JVM
 long getMaxHeap()
          Returns the maximum amount of memory that the JVM will attempt to use in bytes.
 long getMaxNativeMemory()
          Returns the maximum amount of native memory that current HazelcastInstance will attempt to use in bytes.
 long getTotalPhysical()
          Returns total physical memory available in OS.
 long getUsedHeap()
          Returns the amount of used memory in the JVM in bytes.
 long getUsedNativeMemory()
          Returns the amount of used native memory in current HazelcastInstance in bytes.
 

Method Detail

getTotalPhysical

long getTotalPhysical()
Returns total physical memory available in OS.

Returns:
total physical memory in bytes.

getFreePhysical

long getFreePhysical()
Returns free physical memory available in OS.

Some operating systems have cached memory regions in which they store hot cached resources like files. Cached memory is used for allocations when required. So although this cached region is assumed as free, operating systems generally report this region as used not free.

Returns:
free physical memory in bytes.

getMaxHeap

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

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

getCommittedHeap

long getCommittedHeap()
Returns the amount of memory in bytes that is committed for the Java virtual machine to use.

Returns:
the amount of committed memory in bytes.
See Also:
Runtime.totalMemory(), MemoryUsage.getCommitted()

getUsedHeap

long getUsedHeap()
Returns the amount of used memory in the JVM in bytes.

Returns:
the amount of used memory in bytes
See Also:
MemoryUsage.getUsed()

getFreeHeap

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

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

getMaxNativeMemory

long getMaxNativeMemory()
Returns the maximum amount of native memory that current HazelcastInstance will attempt to use in bytes.

Returns:
the maximum amount of native memory in bytes.

getCommittedNativeMemory

long getCommittedNativeMemory()
Returns the amount of native memory in bytes that is committed for current HazelcastInstance to use.

Returns:
the amount of committed native memory in bytes.

getUsedNativeMemory

long getUsedNativeMemory()
Returns the amount of used native memory in current HazelcastInstance in bytes.

Returns:
the amount of used native memory in bytes

getFreeNativeMemory

long getFreeNativeMemory()
Returns the amount of free native memory in current HazelcastInstance in bytes.

Returns:
the amount of free native memory in bytes

getGCStats

GarbageCollectorStats getGCStats()
Returns the garbage collector statistics for the JVM

Returns:
GC statistics


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