API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.lang.management. ThreadMXBean View Source
Author(s)
Mandy Chung
Since
1.5
Version
1.20, 03/08/06
Serial
Hierarchy
 ThreadMXBean
Subinterfaces
Description
public interface ThreadMXBean
  The management interface for the thread system of the Java virtual machine.
Methods
Hide/Show inherited methods
public ThreadInfo dumpAllThreads (boolean lockedMonitors, boolean lockedSynchronizers)
  Returns the thread info for all live threads with stack trace and synchronization information.
public long findDeadlockedThreads ()
  Finds cycles of threads that are in deadlock waiting to acquire object monitors or ownable synchronizers.
public long findMonitorDeadlockedThreads ()
  Finds cycles of threads that are in deadlock waiting to acquire object monitors.
public long getAllThreadIds ()
  Returns all live thread IDs.
public long getCurrentThreadCpuTime ()
  Returns the total CPU time for the current thread in nanoseconds.
public long getCurrentThreadUserTime ()
  Returns the CPU time that the current thread has executed in user mode in nanoseconds.
public int getDaemonThreadCount ()
  Returns the current number of live daemon threads.
public int getPeakThreadCount ()
  Returns the peak live thread count since the Java virtual machine started or peak was reset.
public int getThreadCount ()
  Returns the current number of live threads including both daemon and non-daemon threads.
public long getThreadCpuTime (long id)
  Returns the total CPU time for a thread of the specified ID in nanoseconds.
public ThreadInfo getThreadInfo (long id)
  Returns the thread info for a thread of the specified id with no stack trace.
public ThreadInfo getThreadInfo (long[] ids)
  Returns the thread info for each thread whose ID is in the input array ids with no stack trace.
public 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.
public 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.
public ThreadInfo getThreadInfo (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.
public long getThreadUserTime (long id)
  Returns the CPU time that a thread of the specified ID has executed in user mode in nanoseconds.
public long getTotalStartedThreadCount ()
  Returns the total number of threads created and also started since the Java virtual machine started.
public boolean isCurrentThreadCpuTimeSupported ()
  Tests if the Java virtual machine supports CPU time measurement for the current thread.
public boolean isObjectMonitorUsageSupported ()
  Tests if the Java virtual machine supports monitoring of object monitor usage.
public boolean isSynchronizerUsageSupported ()
  Tests if the Java virtual machine supports monitoring of ownable synchronizer usage.
public boolean isThreadContentionMonitoringEnabled ()
  Tests if thread contention monitoring is enabled.
public boolean isThreadContentionMonitoringSupported ()
  Tests if the Java virtual machine supports thread contention monitoring.
public boolean isThreadCpuTimeEnabled ()
  Tests if thread CPU time measurement is enabled.
public boolean isThreadCpuTimeSupported ()
  Tests if the Java virtual machine implementation supports CPU time measurement for any thread.
public void resetPeakThreadCount ()
  Resets the peak thread count to the current number of live threads.
public void setThreadContentionMonitoringEnabled (boolean enable)
  Enables or disables thread contention monitoring.
public void setThreadCpuTimeEnabled (boolean enable)
  Enables or disables thread CPU time measurement.
Fields
Hide/Show inherited fields
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar