public class LocalMemoryStatsImpl extends Object implements LocalMemoryStats
Modifier and Type | Field and Description |
---|---|
static String |
JSON_COMMITTED_HEAP |
static String |
JSON_COMMITTED_NATIVE_MEMORY |
static String |
JSON_CREATION_TIME |
static String |
JSON_FREE_NATIVE_MEMORY |
static String |
JSON_FREE_PHYSICAL |
static String |
JSON_GC_STATS |
static String |
JSON_MAX_HEAP |
static String |
JSON_MAX_NATIVE_MEMORY |
static String |
JSON_TOTAL_PHYSICAL |
static String |
JSON_USED_HEAP |
static String |
JSON_USED_NATIVE_MEMORY |
STAT_NOT_AVAILABLE
Constructor and Description |
---|
LocalMemoryStatsImpl() |
LocalMemoryStatsImpl(MemoryStats memoryStats) |
Modifier and Type | Method and Description |
---|---|
void |
fromJson(JsonObject json)
Extracts the state from the given
json object and mutates the
state of this object. |
long |
getCommittedHeap()
Returns the amount of memory in bytes that is committed for
the Java virtual machine to use.
|
long |
getCommittedNative()
Returns the amount of native memory in bytes that is committed for
current HazelcastInstance to use.
|
long |
getCreationTime()
Returns the creation time of this distributed object instance on this member.
|
long |
getFreeHeap()
Returns the amount of free memory in the JVM in bytes.
|
long |
getFreeNative()
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 |
getMaxMetadata()
Returns the amount of native memory reserved for metadata.
|
long |
getMaxNative()
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 |
getUsedMetadata() |
long |
getUsedNative()
Returns the amount of used native memory in current HazelcastInstance in bytes.
|
void |
setCommittedHeap(long committedHeap) |
void |
setCommittedNativeMemory(long committed) |
void |
setFreeNativeMemory(long freeNativeMemory) |
void |
setFreePhysical(long freePhysical) |
void |
setGcStats(LocalGCStats gcStats) |
void |
setMaxHeap(long maxHeap) |
void |
setMaxMetadata(long maxMetadata) |
void |
setMaxNativeMemory(long maxNativeMemory) |
void |
setTotalPhysical(long totalPhysical) |
void |
setUsedHeap(long usedHeap) |
void |
setUsedMetadata(long usedMetadata) |
void |
setUsedNativeMemory(long used) |
JsonObject |
toJson()
Serializes state represented by this object into a
JsonObject . |
String |
toString() |
public static final String JSON_CREATION_TIME
public static final String JSON_TOTAL_PHYSICAL
public static final String JSON_FREE_PHYSICAL
public static final String JSON_MAX_NATIVE_MEMORY
public static final String JSON_COMMITTED_NATIVE_MEMORY
public static final String JSON_USED_NATIVE_MEMORY
public static final String JSON_FREE_NATIVE_MEMORY
public static final String JSON_MAX_HEAP
public static final String JSON_COMMITTED_HEAP
public static final String JSON_USED_HEAP
public static final String JSON_GC_STATS
public LocalMemoryStatsImpl()
public LocalMemoryStatsImpl(MemoryStats memoryStats)
public long getTotalPhysical()
MemoryStats
getTotalPhysical
in interface MemoryStats
public void setTotalPhysical(long totalPhysical)
public long getFreePhysical()
MemoryStats
getFreePhysical
in interface MemoryStats
public void setFreePhysical(long freePhysical)
public long getMaxNative()
MemoryStats
getMaxNative
in interface MemoryStats
public void setMaxNativeMemory(long maxNativeMemory)
public long getCommittedNative()
MemoryStats
getCommittedNative
in interface MemoryStats
public void setCommittedNativeMemory(long committed)
public long getUsedNative()
MemoryStats
getUsedNative
in interface MemoryStats
public void setUsedNativeMemory(long used)
public long getFreeNative()
MemoryStats
getFreeNative
in interface MemoryStats
public void setFreeNativeMemory(long freeNativeMemory)
public long getMaxMetadata()
MemoryStats
...NativeMemory
statistics.getMaxMetadata
in interface MemoryStats
public void setMaxMetadata(long maxMetadata)
public long getUsedMetadata()
getUsedMetadata
in interface MemoryStats
public void setUsedMetadata(long usedMetadata)
public long getMaxHeap()
MemoryStats
getMaxHeap
in interface MemoryStats
Runtime.maxMemory()
public long getCommittedHeap()
MemoryStats
getCommittedHeap
in interface MemoryStats
Runtime.totalMemory()
,
MemoryUsage.getCommitted()
public long getUsedHeap()
MemoryStats
getUsedHeap
in interface MemoryStats
MemoryUsage.getUsed()
public void setMaxHeap(long maxHeap)
public void setCommittedHeap(long committedHeap)
public void setUsedHeap(long usedHeap)
public long getFreeHeap()
MemoryStats
getFreeHeap
in interface MemoryStats
Runtime.freeMemory()
public LocalGCStats getGCStats()
MemoryStats
getGCStats
in interface MemoryStats
getGCStats
in interface LocalMemoryStats
public void setGcStats(LocalGCStats gcStats)
public long getCreationTime()
LocalInstanceStats
getCreationTime
in interface LocalInstanceStats
public JsonObject toJson()
JsonSerializable
JsonObject
.toJson
in interface JsonSerializable
public void fromJson(JsonObject json)
JsonSerializable
json
object and mutates the
state of this object.fromJson
in interface JsonSerializable
json
- the JSON object carrying state for this objectCopyright © 2020 Hazelcast, Inc.. All Rights Reserved.