Class ExtendedThreadMXBeanImpl

java.lang.Object
com.ibm.lang.management.internal.ExtendedThreadMXBeanImpl
All Implemented Interfaces:
ThreadMXBean, ThreadMXBean, PlatformManagedObject, ThreadMXBean

public final class ExtendedThreadMXBeanImpl extends Object implements ThreadMXBean
Implementation of the extended ThreadMXBean.
  • Method Details

    • getInstance

      public static ThreadMXBean getInstance()
      Singleton accessor method.
      Returns:
      the ExtendedThreadMXBeanImpl singleton.
    • dumpAllExtendedThreads

      public ExtendedThreadInfo[] dumpAllExtendedThreads(boolean lockedMonitors, boolean lockedSynchronizers) throws InternalError, SecurityException, UnsupportedOperationException
      API method that fetches an array of ExtendedThreadInfo objects corresponding to threads in the virtual machine during the time it is invoked. Fetches an array of ExtendedThreadInfo objects that provide native thread identifiers along with java.lang.management.ThreadInfo object representing the thread. Consider using dumpAllExtendedThreads() in place of dumpAllThreads() as it provides additional thread identification information in an efficient manner.
      Specified by:
      dumpAllExtendedThreads in interface ThreadMXBean
      Parameters:
      lockedMonitors - boolean indication of whether or not information on all currently locked object monitors is to be included in the returned array
      lockedSynchronizers - boolean indication of whether or not information on all currently locked ownable synchronizers is to be included in the returned array
      Returns:
      Array of ExtendedThreadInfo objects.
      Throws:
      InternalError - is thrown in case an error occurs while fetching thread information, typically, an internal error resulting from an inconsistency in the class library.
      UnsupportedOperationException - is thrown if the JVM does not support monitoring object monitor usage or ownable synchronizer usage, even as it has been specified.
      SecurityException
    • getThreadAllocatedBytes

      public long getThreadAllocatedBytes(long threadId)
      Returns an approximation of the total amount of memory, in bytes, allocated in heap memory for the thread with the specified ID. The returned value is an approximation because some Java virtual machine implementations may use object allocation mechanisms that result in a delay between the time an object is allocated and the time its size is recorded.

      If the thread with the specified ID is a virtual thread, is not alive, or does not exist, this method returns -1. If thread memory allocation measurement is disabled, this method returns -1. A thread is alive if it has been started and has not yet terminated.

      If thread memory allocation measurement is enabled after the thread has started, the Java virtual machine implementation may choose any time up to and including the time that the capability is enabled as the point where thread memory allocation measurement starts.

      Specified by:
      getThreadAllocatedBytes in interface ThreadMXBean
      Parameters:
      threadId - the thread ID of a thread
      Returns:
      an approximation of the total memory allocated, in bytes, in heap memory for the thread with the specified ID if the thread with the specified ID is a platform thread, the thread is alive, and thread memory allocation measurement is enabled; -1 otherwise.
      See Also:
    • getThreadAllocatedBytes

      public long[] getThreadAllocatedBytes(long[] threadIds)
      Returns an approximation of the total amount of memory, in bytes, allocated in heap memory for each thread whose ID is in the input array ids. The returned values are approximations because some Java virtual machine implementations may use object allocation mechanisms that result in a delay between the time an object is allocated and the time its size is recorded.

      This method is equivalent to calling the ThreadMXBean.getThreadAllocatedBytes(long) method for each thread ID in the input array ids and setting the returned value in the corresponding element of the returned array.

      Specified by:
      getThreadAllocatedBytes in interface ThreadMXBean
      Parameters:
      threadIds - an array of thread IDs.
      Returns:
      an array of long values, each of which is an approximation of the total memory allocated, in bytes, in heap memory for the thread whose ID is in the corresponding element of the input array of IDs.
      See Also:
    • getThreadCpuTime

      public long[] getThreadCpuTime(long[] threadIds)
      Returns the total CPU time for each thread whose ID is in the input array ids in nanoseconds. The returned values are of nanoseconds precision but not necessarily nanoseconds accuracy.

      This method is equivalent to calling the ThreadMXBean.getThreadCpuTime(long) method for each thread ID in the input array ids and setting the returned value in the corresponding element of the returned array.

      Specified by:
      getThreadCpuTime in interface ThreadMXBean
      Parameters:
      threadIds - an array of thread IDs.
      Returns:
      an array of long values, each of which is the amount of CPU time the thread whose ID is in the corresponding element of the input array of IDs has used, if the thread of a specified ID is a platform thread, the thread is alive, and CPU time measurement is enabled; -1 otherwise.
      See Also:
    • getThreadUserTime

      public long[] getThreadUserTime(long[] threadIds)
      Returns the CPU time that each thread whose ID is in the input array ids has executed in user mode in nanoseconds. The returned values are of nanoseconds precision but not necessarily nanoseconds accuracy.

      This method is equivalent to calling the ThreadMXBean.getThreadUserTime(long) method for each thread ID in the input array ids and setting the returned value in the corresponding element of the returned array.

      Specified by:
      getThreadUserTime in interface ThreadMXBean
      Parameters:
      threadIds - an array of thread IDs.
      Returns:
      an array of long values, each of which is the amount of user mode CPU time the thread whose ID is in the corresponding element of the input array of IDs has used, if the thread of a specified ID is a platform thread, the thread is alive, and CPU time measurement is enabled; -1 otherwise.
      See Also:
    • isThreadAllocatedMemorySupported

      public boolean isThreadAllocatedMemorySupported()
      Tests if the Java virtual machine implementation supports thread memory allocation measurement.
      Specified by:
      isThreadAllocatedMemorySupported in interface ThreadMXBean
      Returns:
      true if the Java virtual machine implementation supports thread memory allocation measurement; false otherwise.
    • isThreadAllocatedMemoryEnabled

      public boolean isThreadAllocatedMemoryEnabled()
      Tests if thread memory allocation measurement is enabled.
      Specified by:
      isThreadAllocatedMemoryEnabled in interface ThreadMXBean
      Returns:
      true if thread memory allocation measurement is enabled; false otherwise.
      See Also:
    • setThreadAllocatedMemoryEnabled

      public void setThreadAllocatedMemoryEnabled(boolean value)
      Enables or disables thread memory allocation measurement. The default is platform dependent.
      Specified by:
      setThreadAllocatedMemoryEnabled in interface ThreadMXBean
      Parameters:
      value - true to enable; false to disable.
      See Also:
    • findMonitorDeadlockedThreads

      public long[] findMonitorDeadlockedThreads()
      Finds cycles of platform threads that are in deadlock waiting to acquire object monitors. That is, platform threads that are blocked waiting to enter a synchronization block or waiting to reenter a synchronization block after an Object.wait call, where each platform thread owns one monitor while trying to obtain another monitor already held by another platform thread in a cycle. Cycles that include virtual threads are not found by this method.

      More formally, a thread is monitor deadlocked if it is part of a cycle in the relation "is waiting for an object monitor owned by". In the simplest case, thread A is blocked waiting for a monitor owned by thread B, and thread B is blocked waiting for a monitor owned by thread A.

      This method is designed for troubleshooting use, but not for synchronization control. It might be an expensive operation.

      This method finds deadlocks involving only object monitors. To find deadlocks involving both object monitors and ownable synchronizers, the findDeadlockedThreads method should be used.

      Specified by:
      findMonitorDeadlockedThreads in interface ThreadMXBean
      Returns:
      an array of IDs of the platform threads that are monitor deadlocked, if any; null otherwise.
      See Also:
    • getAllThreadIds

      public long[] getAllThreadIds()
      Returns the threadIDs of all live platform threads. The thread IDs of virtual threads are not included. Some threads included in the returned array may have been terminated when this method returns.
      Specified by:
      getAllThreadIds in interface ThreadMXBean
      Returns:
      an array of long, each is a thread ID.
    • getCurrentThreadCpuTime

      public long getCurrentThreadCpuTime()
      Returns the total CPU time for the current thread in nanoseconds. The returned value is of nanoseconds precision but not necessarily nanoseconds accuracy. If the implementation distinguishes between user mode time and system mode time, the returned CPU time is the amount of time that the current thread has executed in user mode or system mode.

      This is a convenience method for local management use and is equivalent to calling:

        getThreadCpuTime(Thread.currentThread().threadId());
      
      Specified by:
      getCurrentThreadCpuTime in interface ThreadMXBean
      Returns:
      the total CPU time for the current thread if the current thread is a platform thread and if CPU time measurement is enabled; -1 otherwise.
      See Also:
    • getCurrentThreadUserTime

      public long getCurrentThreadUserTime()
      Returns the CPU time that the current thread has executed in user mode in nanoseconds. The returned value is of nanoseconds precision but not necessarily nanoseconds accuracy.

      This is a convenience method for local management use and is equivalent to calling:

        getThreadUserTime(Thread.currentThread().threadId());
      
      Specified by:
      getCurrentThreadUserTime in interface ThreadMXBean
      Returns:
      the user-level CPU time for the current thread if the current thread is a platform thread and if CPU time measurement is enabled; -1 otherwise.
      See Also:
    • getDaemonThreadCount

      public int getDaemonThreadCount()
      Returns the current number of live platform threads that are daemon threads. The count does not include virtual threads.
      Specified by:
      getDaemonThreadCount in interface ThreadMXBean
      Returns:
      the current number of live platform threads that are daemon threads.
    • getPeakThreadCount

      public int getPeakThreadCount()
      Returns the peak live platform thread count since the Java virtual machine started or peak was reset. The count does not include virtual threads.
      Specified by:
      getPeakThreadCount in interface ThreadMXBean
      Returns:
      the peak live platform thread count.
    • getThreadCount

      public int getThreadCount()
      Returns the current number of live platform threads including both daemon and non-daemon threads. The count does not include virtual threads.
      Specified by:
      getThreadCount in interface ThreadMXBean
      Returns:
      the current number of live platform threads.
    • getThreadCpuTime

      public long getThreadCpuTime(long id)
      Returns the total CPU time for a thread of the specified ID in nanoseconds. The returned value is of nanoseconds precision but not necessarily nanoseconds accuracy. If the implementation distinguishes between user mode time and system mode time, the returned CPU time is the amount of time that the thread has executed in user mode or system mode.

      If the thread of the specified ID is a virtual thread, is not alive or does not exist, this method returns -1. If CPU time measurement is disabled, this method returns -1. A thread is alive if it has been started and has not yet terminated.

      If CPU time measurement is enabled after the thread has started, the Java virtual machine implementation may choose any time up to and including the time that the capability is enabled as the point where CPU time measurement starts.

      Specified by:
      getThreadCpuTime in interface ThreadMXBean
      Parameters:
      id - the thread ID of a thread
      Returns:
      the total CPU time for a thread of the specified ID if the thread of the specified ID is a platform thread, the thread is alive, and CPU time measurement is enabled; -1 otherwise.
      See Also:
    • getThreadInfo

      public ThreadInfo getThreadInfo(long id)
      Returns the thread info for a thread of the specified id with no stack trace. This method is equivalent to calling:
      getThreadInfo(id, 0);

      This method returns a ThreadInfo object representing the thread information for the thread of the specified ID. The stack trace, locked monitors, and locked synchronizers in the returned ThreadInfo object will be empty. If a thread of the given ID is a virtual thread, is not alive, or does not exist, then this method will return null. A thread is alive if it has been started and has not yet terminated.

      MBeanServer access:
      The mapped type of ThreadInfo is CompositeData with attributes as specified in the ThreadInfo.from method.

      Specified by:
      getThreadInfo in interface ThreadMXBean
      Parameters:
      id - the thread ID of the thread. Must be positive.
      Returns:
      a ThreadInfo object for the thread of the given ID with no stack trace, no locked monitor and no synchronizer info; null if the thread of the given ID is a virtual thread, is not alive, or it does not exist.
    • getThreadInfo

      public ThreadInfo[] getThreadInfo(long[] ids)
      Returns the thread info for each thread whose ID is in the input array ids with no stack trace. This method is equivalent to calling:
        getThreadInfo(ids, 0);
      

      This method returns an array of the ThreadInfo objects. The stack trace, locked monitors, and locked synchronizers in each ThreadInfo object will be empty. If a thread of the given ID is a virtual thread, is not alive, or does not exist, the corresponding element in the returned array will contain null. A thread is alive if it has been started and has not yet terminated.

      MBeanServer access:
      The mapped type of ThreadInfo is CompositeData with attributes as specified in the ThreadInfo.from method.

      Specified by:
      getThreadInfo in interface ThreadMXBean
      Parameters:
      ids - an array of thread IDs.
      Returns:
      an array of the ThreadInfo objects, each containing information about a thread whose ID is in the corresponding element of the input array of IDs with no stack trace, no locked monitor and no synchronizer info.
    • getThreadInfo

      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. The maxDepth parameter indicates the maximum number of StackTraceElement to be retrieved from the stack trace. If maxDepth == Integer.MAX_VALUE, the entire stack trace of the thread will be dumped. If maxDepth == 0, no stack trace of the thread will be dumped. This method does not obtain the locked monitors and locked synchronizers of the threads.

      When the Java virtual machine has no stack trace information about a thread or maxDepth == 0, the stack trace in the ThreadInfo object will be an empty array of StackTraceElement.

      This method returns an array of the ThreadInfo objects, each is the thread information about the thread with the same index as in the ids array. If a thread of the given ID is a virtual thread, is not alive, or does not exist, null will be set in the corresponding element in the returned array. A thread is alive if it has been started and has not yet terminated.

      MBeanServer access:
      The mapped type of ThreadInfo is CompositeData with attributes as specified in the ThreadInfo.from method.

      Specified by:
      getThreadInfo in interface ThreadMXBean
      Parameters:
      ids - an array of thread IDs
      maxDepth - the maximum number of entries in the stack trace to be dumped. Integer.MAX_VALUE could be used to request the entire stack to be dumped.
      Returns:
      an array of the ThreadInfo objects, each containing information about a thread whose ID is in the corresponding element of the input array of IDs with no locked monitor and synchronizer info.
    • getThreadInfo

      public ThreadInfo[] getThreadInfo(long[] ids, boolean lockedMonitors, boolean lockedSynchronizers)
      Get together information for threads and create instances of the ThreadInfo class.

      Assumes that caller has already carried out error checking on the id and maxDepth arguments.

      Specified by:
      getThreadInfo in interface ThreadMXBean
      Parameters:
      ids - thread ids
      lockedMonitors - if true attempt to set the returned ThreadInfo with details of object monitors locked by the specified thread
      lockedSynchronizers - if true attempt to set the returned ThreadInfo with details of ownable synchronizers locked by the specified thread
      Returns:
      information for threads
      See Also:
    • getThreadInfo

      public ThreadInfo[] getThreadInfo(long[] ids, boolean lockedMonitors, boolean lockedSynchronizers, int maxDepth)
      Description copied from interface: java.lang.management.ThreadMXBean
      Returns the thread info for each thread whose ID is in the input array ids, with stack trace of the specified maximum number of elements and synchronization information. If maxDepth == 0, no stack trace of the thread will be dumped.

      This method obtains a snapshot of the thread information for each thread including:

      • stack trace of the specified maximum number of elements,
      • the object monitors currently locked by the thread if lockedMonitors is true, and
      • the ownable synchronizers currently locked by the thread if lockedSynchronizers is true.

      This method returns an array of the ThreadInfo objects, each is the thread information about the thread with the same index as in the ids array. If a thread of the given ID is a virtual thread, is not alive, or does not exist, null will be set in the corresponding element in the returned array. A thread is alive if it has been started and has not yet terminated.

      If a thread does not lock any object monitor or lockedMonitors is false, the returned ThreadInfo object will have an empty MonitorInfo array. Similarly, if a thread does not lock any synchronizer or lockedSynchronizers is false, the returned ThreadInfo object will have an empty LockInfo array.

      When both lockedMonitors and lockedSynchronizers parameters are false, it is equivalent to calling:

          getThreadInfo(ids, maxDepth)
      

      This method is designed for troubleshooting use, but not for synchronization control. It might be an expensive operation.

      MBeanServer access:
      The mapped type of ThreadInfo is CompositeData with attributes as specified in the ThreadInfo.from method.

      Specified by:
      getThreadInfo in interface ThreadMXBean
      Parameters:
      ids - an array of thread IDs.
      lockedMonitors - if true, retrieves all locked monitors.
      lockedSynchronizers - if true, retrieves all locked ownable synchronizers.
      maxDepth - indicates the maximum number of StackTraceElement to be retrieved from the stack trace.
      Returns:
      an array of the ThreadInfo objects, each containing information about a thread whose ID is in the corresponding element of the input array of IDs.
      See Also:
    • getThreadInfo

      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. The maxDepth parameter indicates the maximum number of StackTraceElement to be retrieved from the stack trace. If maxDepth == Integer.MAX_VALUE, the entire stack trace of the thread will be dumped. If maxDepth == 0, no stack trace of the thread will be dumped. This method does not obtain the locked monitors and locked synchronizers of the thread.

      When the Java virtual machine has no stack trace information about a thread or maxDepth == 0, the stack trace in the ThreadInfo object will be an empty array of StackTraceElement.

      If a thread of the given ID is a virtual thread, is not alive, or does not exist, this method will return null. A thread is alive if it has been started and has not yet terminated.

      MBeanServer access:
      The mapped type of ThreadInfo is CompositeData with attributes as specified in the ThreadInfo.from method.

      Specified by:
      getThreadInfo in interface ThreadMXBean
      Parameters:
      id - the thread ID of the thread. Must be positive.
      maxDepth - the maximum number of entries in the stack trace to be dumped. Integer.MAX_VALUE could be used to request the entire stack to be dumped.
      Returns:
      a ThreadInfo of the thread of the given ID with no locked monitor and synchronizer info. null if the thread of the given ID is a virtual thread, is not alive or it does not exist.
    • getThreadUserTime

      public long getThreadUserTime(long id)
      Returns the CPU time that a thread of the specified ID has executed in user mode in nanoseconds. The returned value is of nanoseconds precision but not necessarily nanoseconds accuracy.

      If the thread of the specified ID is a virtual thread, is not alive, or does not exist, this method returns -1. If CPU time measurement is disabled, this method returns -1. A thread is alive if it has been started and has not yet terminated.

      If CPU time measurement is enabled after the thread has started, the Java virtual machine implementation may choose any time up to and including the time that the capability is enabled as the point where CPU time measurement starts.

      Specified by:
      getThreadUserTime in interface ThreadMXBean
      Parameters:
      id - the thread ID of a thread
      Returns:
      the user-level CPU time for a thread of the specified ID if the thread of the specified ID is a platform thread, the thread is alive, and CPU time measurement is enabled; -1 otherwise.
      See Also:
    • getTotalStartedThreadCount

      public long getTotalStartedThreadCount()
      Returns the total number of platform threads created and also started since the Java virtual machine started. The count does not include virtual threads.
      Specified by:
      getTotalStartedThreadCount in interface ThreadMXBean
      Returns:
      the total number of platform threads started.
    • isCurrentThreadCpuTimeSupported

      public boolean isCurrentThreadCpuTimeSupported()
      Tests if the Java virtual machine supports CPU time measurement from a platform thread with the ThreadMXBean.getCurrentThreadCpuTime() and ThreadMXBean.getCurrentThreadUserTime() methods. This method returns true if ThreadMXBean.isThreadCpuTimeSupported() returns true.
      Specified by:
      isCurrentThreadCpuTimeSupported in interface ThreadMXBean
      Returns:
      true if the Java virtual machine supports CPU time measurement of the current platform thread; false otherwise.
    • isThreadContentionMonitoringEnabled

      public boolean isThreadContentionMonitoringEnabled()
      Tests if thread contention monitoring is enabled.
      Specified by:
      isThreadContentionMonitoringEnabled in interface ThreadMXBean
      Returns:
      true if thread contention monitoring is enabled; false otherwise.
      See Also:
    • isThreadContentionMonitoringSupported

      public boolean isThreadContentionMonitoringSupported()
      Tests if the Java virtual machine supports thread contention monitoring.
      Specified by:
      isThreadContentionMonitoringSupported in interface ThreadMXBean
      Returns:
      true if the Java virtual machine supports thread contention monitoring; false otherwise.
    • isThreadCpuTimeEnabled

      public boolean isThreadCpuTimeEnabled()
      Tests if thread CPU time measurement is enabled.
      Specified by:
      isThreadCpuTimeEnabled in interface ThreadMXBean
      Returns:
      true if thread CPU time measurement is enabled; false otherwise.
      See Also:
    • isThreadCpuTimeSupported

      public boolean isThreadCpuTimeSupported()
      Tests if the Java virtual machine implementation supports CPU time measurement for any platform thread. A Java virtual machine implementation that supports CPU time measurement for any platform thread will also support CPU time measurement for the current thread, when the current thread is a platform thread.
      Specified by:
      isThreadCpuTimeSupported in interface ThreadMXBean
      Returns:
      true if the Java virtual machine supports CPU time measurement for any platform thread; false otherwise.
    • resetPeakThreadCount

      public void resetPeakThreadCount()
      Resets the peak thread count to the current number of live platform threads.
      Specified by:
      resetPeakThreadCount in interface ThreadMXBean
      See Also:
    • setThreadContentionMonitoringEnabled

      public void setThreadContentionMonitoringEnabled(boolean enable)
      Enables or disables thread contention monitoring. Thread contention monitoring is disabled by default.
      Specified by:
      setThreadContentionMonitoringEnabled in interface ThreadMXBean
      Parameters:
      enable - true to enable; false to disable.
      See Also:
    • setThreadCpuTimeEnabled

      public void setThreadCpuTimeEnabled(boolean enable)
      Enables or disables thread CPU time measurement. The default is platform dependent.
      Specified by:
      setThreadCpuTimeEnabled in interface ThreadMXBean
      Parameters:
      enable - true to enable; false to disable.
      See Also:
    • isObjectMonitorUsageSupported

      public boolean isObjectMonitorUsageSupported()
      Tests if the Java virtual machine supports monitoring of object monitor usage.
      Specified by:
      isObjectMonitorUsageSupported in interface ThreadMXBean
      Returns:
      true if the Java virtual machine supports monitoring of object monitor usage; false otherwise.
      See Also:
    • isSynchronizerUsageSupported

      public boolean isSynchronizerUsageSupported()
      Tests if the Java virtual machine supports monitoring of ownable synchronizer usage.
      Specified by:
      isSynchronizerUsageSupported in interface ThreadMXBean
      Returns:
      true if the Java virtual machine supports monitoring of ownable synchronizer usage; false otherwise.
      See Also:
    • findDeadlockedThreads

      public long[] findDeadlockedThreads()
      Finds cycles of platform threads that are in deadlock waiting to acquire object monitors or ownable synchronizers. Platform threads are deadlocked in a cycle waiting for a lock of these two types if each thread owns one lock while trying to acquire another lock already held by another platform thread in the cycle. Cycles that include virtual threads are not found by this method.

      This method is designed for troubleshooting use, but not for synchronization control. It might be an expensive operation.

      Specified by:
      findDeadlockedThreads in interface ThreadMXBean
      Returns:
      an array of IDs of the platform threads that are deadlocked waiting for object monitors or ownable synchronizers, if any; null otherwise.
      See Also:
    • dumpAllThreads

      public ThreadInfo[] dumpAllThreads(boolean lockedMonitors, boolean lockedSynchronizers)
      Returns the thread info for all live platform threads with stack trace and synchronization information. The thread IDs of virtual threads are not included. This method is equivalent to calling:
      dumpAllThreads(lockedMonitors, lockedSynchronizers, Integer.MAX_VALUE)
      Specified by:
      dumpAllThreads in interface ThreadMXBean
      Parameters:
      lockedMonitors - if true, dump all locked monitors.
      lockedSynchronizers - if true, dump all locked ownable synchronizers.
      Returns:
      an array of ThreadInfo for all live platform threads.
      See Also:
    • dumpAllThreads

      public ThreadInfo[] dumpAllThreads(boolean lockedMonitors, boolean lockedSynchronizers, int maxDepth)
      Returns the thread info for all live platform threads with stack trace of the specified maximum number of elements and synchronization information. if maxDepth == 0, no stack trace of the thread will be dumped. The thread IDs of virtual threads are not included. Some threads included in the returned array may have been terminated when this method returns.

      This method returns an array of ThreadInfo objects as specified in the ThreadMXBean.getThreadInfo(long[], boolean, boolean, int) method.

      Specified by:
      dumpAllThreads in interface ThreadMXBean
      Parameters:
      lockedMonitors - if true, dump all locked monitors.
      lockedSynchronizers - if true, dump all locked ownable synchronizers.
      maxDepth - indicates the maximum number of StackTraceElement to be retrieved from the stack trace.
      Returns:
      an array of ThreadInfo for all live platform threads.
      See Also:
    • getNativeThreadIds

      public long[] getNativeThreadIds(long[] threadIDs) throws IllegalArgumentException, SecurityException
      To satisfy com.ibm.lang.management.ThreadMXBean.
      Throws:
      IllegalArgumentException
      SecurityException
    • getNativeThreadId

      public long getNativeThreadId(long threadId) throws IllegalArgumentException, SecurityException
      To satisfy com.ibm.lang.management.
      Throws:
      IllegalArgumentException
      SecurityException
    • getObjectName

      public ObjectName getObjectName()
      Returns an ObjectName instance representing the object name of this platform managed object.
      Specified by:
      getObjectName in interface PlatformManagedObject
      Returns:
      an ObjectName instance representing the object name of this platform managed object.