Thread.State, Thread.UncaughtExceptionHandler
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
Constructor and Description |
---|
MemoryLogger(org.slf4j.Logger logger,
long interval,
akka.actor.ActorSystem monitored)
Creates a new memory logger that logs in the given interval and lives as long as the
given actor system.
|
Modifier and Type | Method and Description |
---|---|
static String |
getDirectMemoryStatsAsString(BufferPoolMXBean bufferPoolMxBean)
Returns a String with the direct memory footprint.
|
static String |
getGarbageCollectorStatsAsString(List<GarbageCollectorMXBean> gcMXBeans)
Gets the garbage collection statistics from the JVM.
|
static String |
getMemoryPoolStatsAsString(List<MemoryPoolMXBean> poolBeans)
Gets the memory pool statistics from the JVM.
|
static String |
getMemoryUsageStatsAsString(MemoryMXBean memoryMXBean)
Gets the memory footprint of the JVM in a string representation.
|
void |
run() |
void |
shutdown() |
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
public MemoryLogger(org.slf4j.Logger logger, long interval, akka.actor.ActorSystem monitored)
logger
- The logger to use for outputting the memory statistics.interval
- The interval in which the thread logs.monitored
- The actor system to whose life the thread is bound. The thread terminates
once the actor system terminates.public void shutdown()
public static String getMemoryUsageStatsAsString(MemoryMXBean memoryMXBean)
public static String getDirectMemoryStatsAsString(BufferPoolMXBean bufferPoolMxBean)
These stats are not part of the other memory beans.
bufferPoolMxBean
- The direct buffer pool bean or null
if none available.public static String getMemoryPoolStatsAsString(List<MemoryPoolMXBean> poolBeans)
poolBeans
- The collection of memory pool beans.public static String getGarbageCollectorStatsAsString(List<GarbageCollectorMXBean> gcMXBeans)
gcMXBeans
- The collection of garbage collector beans.Copyright © 2014–2018 The Apache Software Foundation. All rights reserved.