public class ThreadDump
extends java.lang.Object
Modifier | Constructor and Description |
---|---|
protected |
ThreadDump() |
Modifier and Type | Method and Description |
---|---|
protected void |
buildThread(java.lang.StringBuilder sb,
java.lang.management.ThreadInfo info,
java.lang.management.ThreadInfo nextInfo) |
protected void |
buildThreads(java.lang.StringBuilder sb,
java.lang.management.ThreadInfo[] infoArray,
java.lang.Thread.State matchState,
boolean isNative) |
static ThreadDump |
create()
Returns the singleton instance, creating if necessary.
|
void |
dumpThreads()
Log all threads to com.caucho.util.ThreadDump at info level.
|
void |
dumpThreads(int depth,
boolean onlyActive)
Log threads to com.caucho.util.ThreadDump at info level.
|
java.lang.String |
getThreadDump()
Returns dump of all threads.
|
java.lang.String |
getThreadDump(int depth,
boolean onlyActive)
Returns dump of threads.
|
java.lang.String |
jsonThreadDump() |
public static ThreadDump create()
public void dumpThreads()
public java.lang.String getThreadDump()
public void dumpThreads(int depth, boolean onlyActive)
onlyActive
- if true only running threads are loggedpublic java.lang.String getThreadDump(int depth, boolean onlyActive)
onlyActive
- if true only running threads are loggedprotected void buildThreads(java.lang.StringBuilder sb, java.lang.management.ThreadInfo[] infoArray, java.lang.Thread.State matchState, boolean isNative)
protected void buildThread(java.lang.StringBuilder sb, java.lang.management.ThreadInfo info, java.lang.management.ThreadInfo nextInfo)
public java.lang.String jsonThreadDump()