com.hazelcast.monitor.impl
Class LocalMemoryStatsImpl

java.lang.Object
  extended by com.hazelcast.monitor.impl.LocalMemoryStatsImpl
All Implemented Interfaces:
JsonSerializable, MemoryStats, LocalInstanceStats, LocalMemoryStats

public class LocalMemoryStatsImpl
extends Object
implements LocalMemoryStats


Field Summary
 
Fields inherited from interface com.hazelcast.monitor.LocalInstanceStats
STAT_NOT_AVAILABLE
 
Constructor Summary
LocalMemoryStatsImpl()
           
LocalMemoryStatsImpl(MemoryStats memoryStats)
           
 
Method Summary
 boolean equals(Object o)
           
 void fromJson(com.eclipsesource.json.JsonObject json)
           
 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 getCreationTime()
           
 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.
 LocalGCStats 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.
 int hashCode()
           
 void setCommittedHeap(long committedHeap)
           
 void setCommittedNativeMemory(long allocated)
           
 void setFreeNativeMemory(long freeNativeMemory)
           
 void setFreePhysical(long freePhysical)
           
 void setGcStats(LocalGCStats gcStats)
           
 void setMaxHeap(long maxHeap)
           
 void setMaxNativeMemory(long maxNativeMemory)
           
 void setTotalPhysical(long totalPhysical)
           
 void setUsedHeap(long usedHeap)
           
 void setUsedNativeMemory(long used)
           
 com.eclipsesource.json.JsonObject toJson()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LocalMemoryStatsImpl

public LocalMemoryStatsImpl()

LocalMemoryStatsImpl

public LocalMemoryStatsImpl(MemoryStats memoryStats)
Method Detail

getTotalPhysical

public long getTotalPhysical()
Description copied from interface: MemoryStats
Returns total physical memory available in OS.

Specified by:
getTotalPhysical in interface MemoryStats
Returns:
total physical memory in bytes.

setTotalPhysical

public void setTotalPhysical(long totalPhysical)

getFreePhysical

public long getFreePhysical()
Description copied from interface: MemoryStats
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.

Specified by:
getFreePhysical in interface MemoryStats
Returns:
free physical memory in bytes.

setFreePhysical

public void setFreePhysical(long freePhysical)

getMaxNativeMemory

public long getMaxNativeMemory()
Description copied from interface: MemoryStats
Returns the maximum amount of native memory that current HazelcastInstance will attempt to use in bytes.

Specified by:
getMaxNativeMemory in interface MemoryStats
Returns:
the maximum amount of native memory in bytes.

setMaxNativeMemory

public void setMaxNativeMemory(long maxNativeMemory)

getCommittedNativeMemory

public long getCommittedNativeMemory()
Description copied from interface: MemoryStats
Returns the amount of native memory in bytes that is committed for current HazelcastInstance to use.

Specified by:
getCommittedNativeMemory in interface MemoryStats
Returns:
the amount of committed native memory in bytes.

setCommittedNativeMemory

public void setCommittedNativeMemory(long allocated)

getUsedNativeMemory

public long getUsedNativeMemory()
Description copied from interface: MemoryStats
Returns the amount of used native memory in current HazelcastInstance in bytes.

Specified by:
getUsedNativeMemory in interface MemoryStats
Returns:
the amount of used native memory in bytes

setUsedNativeMemory

public void setUsedNativeMemory(long used)

getFreeNativeMemory

public long getFreeNativeMemory()
Description copied from interface: MemoryStats
Returns the amount of free native memory in current HazelcastInstance in bytes.

Specified by:
getFreeNativeMemory in interface MemoryStats
Returns:
the amount of free native memory in bytes

setFreeNativeMemory

public void setFreeNativeMemory(long freeNativeMemory)

getMaxHeap

public long getMaxHeap()
Description copied from interface: MemoryStats
Returns the maximum amount of memory that the JVM will attempt to use in bytes.

Specified by:
getMaxHeap in interface MemoryStats
Returns:
the maximum amount of memory in bytes.
See Also:
Runtime.maxMemory()

getCommittedHeap

public long getCommittedHeap()
Description copied from interface: MemoryStats
Returns the amount of memory in bytes that is committed for the Java virtual machine to use.

Specified by:
getCommittedHeap in interface MemoryStats
Returns:
the amount of committed memory in bytes.
See Also:
Runtime.totalMemory(), MemoryUsage.getCommitted()

getUsedHeap

public long getUsedHeap()
Description copied from interface: MemoryStats
Returns the amount of used memory in the JVM in bytes.

Specified by:
getUsedHeap in interface MemoryStats
Returns:
the amount of used memory in bytes
See Also:
MemoryUsage.getUsed()

setMaxHeap

public void setMaxHeap(long maxHeap)

setCommittedHeap

public void setCommittedHeap(long committedHeap)

setUsedHeap

public void setUsedHeap(long usedHeap)

getFreeHeap

public long getFreeHeap()
Description copied from interface: MemoryStats
Returns the amount of free memory in the JVM in bytes.

Specified by:
getFreeHeap in interface MemoryStats
Returns:
the amount of free memory in bytes
See Also:
Runtime.freeMemory()

getGCStats

public LocalGCStats getGCStats()
Description copied from interface: MemoryStats
Returns the garbage collector statistics for the JVM

Specified by:
getGCStats in interface MemoryStats
Specified by:
getGCStats in interface LocalMemoryStats
Returns:
GC statistics

setGcStats

public void setGcStats(LocalGCStats gcStats)

toString

public String toString()
Overrides:
toString in class Object

getCreationTime

public long getCreationTime()
Specified by:
getCreationTime in interface LocalInstanceStats

toJson

public com.eclipsesource.json.JsonObject toJson()
Specified by:
toJson in interface JsonSerializable

fromJson

public void fromJson(com.eclipsesource.json.JsonObject json)
Specified by:
fromJson in interface JsonSerializable

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


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