com.yammer.metrics.core
Class VirtualMachineMBeans

java.lang.Object
  extended by com.yammer.metrics.core.VirtualMachineMBeans

public class VirtualMachineMBeans
extends Object

A collection of Java Virtual Machine metrics.


Field Summary
private  List<GarbageCollectorMXBean> garbageCollectors
           
private static VirtualMachineMBeans INSTANCE
           
private static int MAX_STACK_TRACE_DEPTH
           
private  MBeanServer mBeanServer
           
private  MemoryMXBean memory
           
private  List<MemoryPoolMXBean> memoryPools
           
private  OperatingSystemMXBean os
           
private  RuntimeMXBean runtime
           
private  ThreadMXBean threads
           
 
Constructor Summary
VirtualMachineMBeans(MemoryMXBean memory, List<MemoryPoolMXBean> memoryPools, OperatingSystemMXBean os, ThreadMXBean threads, List<GarbageCollectorMXBean> garbageCollectors, RuntimeMXBean runtime, MBeanServer mBeanServer)
           
 
Method Summary
 Set<String> getDeadlockedThreads()
          Returns a set of strings describing deadlocked threads, if any are deadlocked.
 List<GarbageCollectorMXBean> getGarbageCollectors()
           
static VirtualMachineMBeans getInstance()
          The default instance of VirtualMachineMBeans.
 MBeanServer getMBeanServer()
           
 MemoryMXBean getMemory()
           
 List<MemoryPoolMXBean> getMemoryPools()
           
 String getName()
          Returns the name of the currently-running jvm.
 OperatingSystemMXBean getOs()
           
 RuntimeMXBean getRuntime()
           
 void getThreadDump(OutputStream out)
          Dumps all of the threads' current information to an output stream.
 ThreadMXBean getThreads()
           
 String getVersion()
          Returns the version of the currently-running jvm.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAX_STACK_TRACE_DEPTH

private static final int MAX_STACK_TRACE_DEPTH
See Also:
Constant Field Values

INSTANCE

private static final VirtualMachineMBeans INSTANCE

memory

private final MemoryMXBean memory

memoryPools

private final List<MemoryPoolMXBean> memoryPools

os

private final OperatingSystemMXBean os

threads

private final ThreadMXBean threads

garbageCollectors

private final List<GarbageCollectorMXBean> garbageCollectors

runtime

private final RuntimeMXBean runtime

mBeanServer

private final MBeanServer mBeanServer
Constructor Detail

VirtualMachineMBeans

VirtualMachineMBeans(MemoryMXBean memory,
                     List<MemoryPoolMXBean> memoryPools,
                     OperatingSystemMXBean os,
                     ThreadMXBean threads,
                     List<GarbageCollectorMXBean> garbageCollectors,
                     RuntimeMXBean runtime,
                     MBeanServer mBeanServer)
Method Detail

getInstance

public static VirtualMachineMBeans getInstance()
The default instance of VirtualMachineMBeans.

Returns:
the default instance

getMemory

public MemoryMXBean getMemory()

getMemoryPools

public List<MemoryPoolMXBean> getMemoryPools()

getOs

public OperatingSystemMXBean getOs()

getThreads

public ThreadMXBean getThreads()

getGarbageCollectors

public List<GarbageCollectorMXBean> getGarbageCollectors()

getRuntime

public RuntimeMXBean getRuntime()

getMBeanServer

public MBeanServer getMBeanServer()

getVersion

public String getVersion()
Returns the version of the currently-running jvm.

Returns:
the version of the currently-running jvm, eg "1.6.0_24"
See Also:
J2SE SDK/JRE Version String Naming Convention

getName

public String getName()
Returns the name of the currently-running jvm.

Returns:
the name of the currently-running jvm, eg "Java HotSpot(TM) Client VM"
See Also:
System.getProperties()

getDeadlockedThreads

public Set<String> getDeadlockedThreads()
Returns a set of strings describing deadlocked threads, if any are deadlocked.

Returns:
a set of any deadlocked threads

getThreadDump

public void getThreadDump(OutputStream out)
Dumps all of the threads' current information to an output stream.

Parameters:
out - an output stream


Copyright © 2013 Immobilien Scout GmbH. All Rights Reserved.