@InterfaceAudience.Private public abstract class ThreadMonitoring extends Object
Modifier and Type | Field and Description |
---|---|
private static int |
STACK_DEPTH |
private static ThreadMXBean |
threadBean |
Constructor and Description |
---|
ThreadMonitoring() |
Modifier and Type | Method and Description |
---|---|
static void |
appendThreadInfo(StringBuilder sb,
ThreadInfo info,
String indent)
Print all of the thread's information and stack traces.
|
static String |
formatThreadInfo(ThreadInfo threadInfo,
String indent)
Format the given ThreadInfo object as a String.
|
private static String |
getTaskName(long id,
String name) |
static ThreadInfo |
getThreadInfo(Thread t) |
private static final ThreadMXBean threadBean
private static final int STACK_DEPTH
public static ThreadInfo getThreadInfo(Thread t)
public static String formatThreadInfo(ThreadInfo threadInfo, String indent)
indent
- a prefix for each line, used for nested indentationpublic static void appendThreadInfo(StringBuilder sb, ThreadInfo info, String indent)
sb
- info
- indent
- Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.