public final class MemoryStats extends Object implements StatsLogger.Callback
| Modifier and Type | Class and Description |
|---|---|
static class |
MemoryStats.EntityType
Various entity types
|
class |
MemoryStats.EntityTypeStats
Stores stats counters for an entity (entity, message, collection) or a group of entities
|
class |
MemoryStats.IOBufferStats
Stores global IO Buffer memory stats counters
|
class |
MemoryStats.NativeMemoryStats
Stores global native memory stats counters
|
| Modifier and Type | Method and Description |
|---|---|
void |
after()
Implementation of
StatsLogger.Callback#after() |
void |
before()
Implementation of
StatsLogger.Callback#before() |
void |
get(StringBuilder sb)
Implementation of
StatsLogger.Callback#get(StringBuilder) |
MemoryStats.EntityTypeStats |
getCollectionStatsCounters()
Get aggregate collection stats counters across all collection types
|
Map<Class<?>,MemoryStats.EntityTypeStats> |
getCollectionTypeStatsCounters()
Get collection stats counters by collection type
|
MemoryStats.EntityTypeStats |
getEmbeddedEntityStatsCounters()
Get aggregate embedded entity stats counters across all entity types
|
Map<Class<?>,MemoryStats.EntityTypeStats> |
getEmbeddedEntityTypeStatsCounters()
Get embedded entity stats counters by entity type
|
MemoryStats.EntityTypeStats |
getEntityStatsCounters()
Get aggregate entity stats counters across all entity types
|
Map<Class<?>,MemoryStats.EntityTypeStats> |
getEntityTypeStatsCounters()
Get entity stats counters by entity type
|
MemoryUsage |
getHeapMemoryUsage()
Get heap memory usage
|
static MemoryStats |
getInstance()
Get the singleton node stats instance
|
MemoryStats.IOBufferStats |
getIOBufferStatsCounters()
Get IOBuffer stats counters
|
MemoryStats.EntityTypeStats |
getMessageStatsCounters()
Get aggregate message stats counters across all message types
|
Map<Class<?>,MemoryStats.EntityTypeStats> |
getMessageTypeStatsCounters()
Get message stats counters by message type
|
MemoryStats.NativeMemoryStats |
getNativeStatsCounters()
Get native stats counters
|
long |
getOffHeapMemoryUsedLive()
Get used live off-heap (native) memory
This method returns the amount of off-heap (native) memory in live use
|
long |
getOffHeapMemoryUsedPooled()
Get used pooled off-heap (native) memory
This method returns the amount of off-heap (native) memory in pools
|
void |
init()
Implementation of
StatsLogger.Callback#init() |
void |
onEntityAllocated(Class<?> entity,
MemoryStats.EntityType entityType,
boolean fromPool)
Record the allocation of an entity
|
void |
onEntityDataAllocated(Class<?> entity,
MemoryStats.EntityType entityType,
int bytes)
Record the allocation of an entity data
|
void |
onEntityDataDisposed(Class<?> entity,
MemoryStats.EntityType entityType,
int bytes,
boolean toPool)
Record the disposition of an entity data
|
void |
onEntityDeserializerAllocated(Class<?> entity,
MemoryStats.EntityType entityType,
boolean fromPool)
Record the allocation of an entity deserializer
|
void |
onEntityDeserializerDisposed(Class<?> entity,
MemoryStats.EntityType entityType,
boolean toPool)
Record the disposition of an entity deserializer
|
void |
onEntityDeserializerLeaked(Class<?> entity,
MemoryStats.EntityType entityType)
Record the leakage of an entity deserializer
|
void |
onEntityDisposed(Class<?> entity,
MemoryStats.EntityType entityType,
boolean toPool)
Record the disposition of an entity
|
void |
onEntityLeaked(Class<?> entity,
MemoryStats.EntityType entityType)
Record the pool leakage of an entity
|
void |
onEntityMetadataAllocated(Class<?> entity,
MemoryStats.EntityType entityType,
int bytes)
Record the allocation of an entity metadata
|
void |
onEntityMetadataDisposed(Class<?> entity,
MemoryStats.EntityType entityType,
int bytes,
boolean toPool)
Record the disposition of an entity metadata
|
void |
onEntityPojoAllocated(Class<?> entity,
MemoryStats.EntityType entityType,
boolean fromPool)
Record the allocation of an entity pojo
|
void |
onEntityPojoDisposed(Class<?> entity,
MemoryStats.EntityType entityType,
boolean toPool)
Record the disposition of an entity pojo
|
void |
onEntityPojoLeaked(Class<?> entity,
MemoryStats.EntityType entityType)
Record the leakage of an entity pojo
|
void |
onEntitySerializerAllocated(Class<?> entity,
MemoryStats.EntityType entityType,
boolean fromPool)
Record the allocation of an entity serializer
|
void |
onEntitySerializerDisposed(Class<?> entity,
MemoryStats.EntityType entityType,
boolean toPool)
Record the disposition of an entity serializer
|
void |
onEntitySerializerLeaked(Class<?> entity,
MemoryStats.EntityType entityType)
Record the leakage of an entity serializer
|
void |
onIOBufferAllocated(boolean fromPool,
int bytes)
Record an IOBuffer allocation
|
void |
onIOBufferDisposed(boolean toPool,
int bytes)
Record an IOBuffer disposition
|
void |
onIOBufferForked(int bytes)
Record an IOBuffer fork
|
void |
onIOBufferLeaked(int bytes)
Record an IOBuffer pool leakage
|
void |
onIOBufferReallocated(int bytes)
Record an IOBuffer reallocation
|
void |
onNativeMemoryAllocated(long bytes)
Record a native memory allocation
|
void |
onNativeMemoryFreed(long bytes)
Record a native memory free
|
void |
onNativeMemoryReallocated(long bytes)
Record a native memory reallocation
|
public static final MemoryStats getInstance()
public final void init()
StatsLogger.Callback#init()init in interface StatsLogger.Callbackpublic final void get(StringBuilder sb)
StatsLogger.Callback#get(StringBuilder)get in interface StatsLogger.Callbackpublic final void before()
StatsLogger.Callback#before()before in interface StatsLogger.Callbackpublic final void after()
StatsLogger.Callback#after()after in interface StatsLogger.Callbackpublic final void onNativeMemoryAllocated(long bytes)
public final void onNativeMemoryReallocated(long bytes)
public final void onNativeMemoryFreed(long bytes)
public final void onIOBufferAllocated(boolean fromPool,
int bytes)
public final void onIOBufferReallocated(int bytes)
public final void onIOBufferForked(int bytes)
public final void onIOBufferDisposed(boolean toPool,
int bytes)
public final void onIOBufferLeaked(int bytes)
public final void onEntityAllocated(Class<?> entity, MemoryStats.EntityType entityType, boolean fromPool)
entity - The entity classentityType - The type of entitypublic final void onEntityDisposed(Class<?> entity, MemoryStats.EntityType entityType, boolean toPool)
entity - The entity classpublic final void onEntityLeaked(Class<?> entity, MemoryStats.EntityType entityType)
entity - The entity classpublic final void onEntityPojoAllocated(Class<?> entity, MemoryStats.EntityType entityType, boolean fromPool)
entity - The entity classpublic final void onEntityPojoDisposed(Class<?> entity, MemoryStats.EntityType entityType, boolean toPool)
entity - The entity classpublic final void onEntityPojoLeaked(Class<?> entity, MemoryStats.EntityType entityType)
entity - The entity classpublic final void onEntitySerializerAllocated(Class<?> entity, MemoryStats.EntityType entityType, boolean fromPool)
entity - The entity classpublic final void onEntitySerializerDisposed(Class<?> entity, MemoryStats.EntityType entityType, boolean toPool)
entity - The entity classpublic final void onEntitySerializerLeaked(Class<?> entity, MemoryStats.EntityType entityType)
entity - The entity classpublic final void onEntityDeserializerAllocated(Class<?> entity, MemoryStats.EntityType entityType, boolean fromPool)
entity - The entity classpublic final void onEntityDeserializerDisposed(Class<?> entity, MemoryStats.EntityType entityType, boolean toPool)
entity - The entity classpublic final void onEntityDeserializerLeaked(Class<?> entity, MemoryStats.EntityType entityType)
entity - The entity classpublic final void onEntityMetadataAllocated(Class<?> entity, MemoryStats.EntityType entityType, int bytes)
entity - The entity classbytes - Number of metadata bytes allocatedpublic final void onEntityMetadataDisposed(Class<?> entity, MemoryStats.EntityType entityType, int bytes, boolean toPool)
entity - The entity classbytes - Number of metadata bytes disposedpublic final void onEntityDataAllocated(Class<?> entity, MemoryStats.EntityType entityType, int bytes)
entity - The entity classbytes - Number of data bytes allocatedpublic final void onEntityDataDisposed(Class<?> entity, MemoryStats.EntityType entityType, int bytes, boolean toPool)
entity - The entity classbytes - Number of data bytes disposedpublic final MemoryUsage getHeapMemoryUsage()
public final long getOffHeapMemoryUsedLive()
This method returns the amount of off-heap (native) memory in live use
public final long getOffHeapMemoryUsedPooled()
This method returns the amount of off-heap (native) memory in pools
public final MemoryStats.NativeMemoryStats getNativeStatsCounters()
public final MemoryStats.IOBufferStats getIOBufferStatsCounters()
public final MemoryStats.EntityTypeStats getEmbeddedEntityStatsCounters()
public final Map<Class<?>,MemoryStats.EntityTypeStats> getEmbeddedEntityTypeStatsCounters()
public final MemoryStats.EntityTypeStats getEntityStatsCounters()
public final Map<Class<?>,MemoryStats.EntityTypeStats> getEntityTypeStatsCounters()
public final MemoryStats.EntityTypeStats getMessageStatsCounters()
public final Map<Class<?>,MemoryStats.EntityTypeStats> getMessageTypeStatsCounters()
public final MemoryStats.EntityTypeStats getCollectionStatsCounters()
public final Map<Class<?>,MemoryStats.EntityTypeStats> getCollectionTypeStatsCounters()
Copyright © 2019 N5 Technologies, Inc. All Rights Reserved.