Java java.lang.management ThreadMXBean fields, constructors, methods, implement or subclass

Example usage for Java java.lang.management ThreadMXBean fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for java.lang.management ThreadMXBean.

The text is from its open source code.

Method

ThreadInfo[]dumpAllThreads(boolean lockedMonitors, boolean lockedSynchronizers)
Returns the thread info for all live threads with stack trace and synchronization information.
long[]findDeadlockedThreads()
Finds cycles of threads that are in deadlock waiting to acquire object monitors or ownable synchronizers.
long[]findMonitorDeadlockedThreads()
Finds cycles of threads that are in deadlock waiting to acquire object monitors.
long[]getAllThreadIds()
Returns all live thread IDs.
ClassgetClass()
Returns the runtime class of this Object .
longgetCurrentThreadCpuTime()
Returns the total CPU time for the current thread in nanoseconds.
longgetCurrentThreadUserTime()
Returns the CPU time that the current thread has executed in user mode in nanoseconds.
intgetDaemonThreadCount()
Returns the current number of live daemon threads.
intgetPeakThreadCount()
Returns the peak live thread count since the Java virtual machine started or peak was reset.
intgetThreadCount()
Returns the current number of live threads including both daemon and non-daemon threads.
longgetThreadCpuTime(long id)
Returns the total CPU time for a thread of the specified ID in nanoseconds.
ThreadInfo[]getThreadInfo(long[] ids, boolean lockedMonitors, boolean lockedSynchronizers)
Returns the thread info for each thread whose ID is in the input array ids , with stack trace and synchronization information.
ThreadInfogetThreadInfo(long id, int maxDepth)
Returns a thread info for a thread of the specified id , with stack trace of a specified number of stack trace elements.
ThreadInfo[]getThreadInfo(long[] ids, int maxDepth)
Returns the thread info for each thread whose ID is in the input array ids , with stack trace of a specified number of stack trace elements.
ThreadInfogetThreadInfo(long id)
Returns the thread info for a thread of the specified id with no stack trace.
ThreadInfo[]getThreadInfo(long[] ids)
Returns the thread info for each thread whose ID is in the input array ids with no stack trace.
longgetThreadUserTime(long id)
Returns the CPU time that a thread of the specified ID has executed in user mode in nanoseconds.
longgetTotalStartedThreadCount()
Returns the total number of threads created and also started since the Java virtual machine started.
booleanisCurrentThreadCpuTimeSupported()
Tests if the Java virtual machine supports CPU time measurement for the current thread.
booleanisObjectMonitorUsageSupported()
Tests if the Java virtual machine supports monitoring of object monitor usage.
booleanisSynchronizerUsageSupported()
Tests if the Java virtual machine supports monitoring of ownable synchronizer usage.
booleanisThreadContentionMonitoringEnabled()
Tests if thread contention monitoring is enabled.
booleanisThreadContentionMonitoringSupported()
Tests if the Java virtual machine supports thread contention monitoring.
booleanisThreadCpuTimeEnabled()
Tests if thread CPU time measurement is enabled.
booleanisThreadCpuTimeSupported()
Tests if the Java virtual machine implementation supports CPU time measurement for any thread.
voidsetThreadContentionMonitoringEnabled(boolean enable)
Enables or disables thread contention monitoring.
voidsetThreadCpuTimeEnabled(boolean enable)
Enables or disables thread CPU time measurement.