|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfulmine.util.concurrent.ThreadUtils
public abstract class ThreadUtils
Utilities for working with threads.
| Field Summary | |
|---|---|
static String |
DEFAULT_THREAD_DUMP_SAMPLE_RATE
The default sample rate for thread dumps |
static String |
THREAD_DUMP_SAMPLE_RATE
System property name for setting the sample rate (in milliseconds) for executing thread dumps. |
| Constructor Summary | |
|---|---|
ThreadUtils()
|
|
| Method Summary | |
|---|---|
static void |
dumpThreads()
Print all thread stack traces to System.out. |
static boolean |
findDeadlocks()
Find any deadlocked threads. |
static void |
startThreadDumps()
Kicks off a daemon thread that periodically logs all thread stack traces to the LOG at the Log.info(Object) level. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String THREAD_DUMP_SAMPLE_RATE
DEFAULT_THREAD_DUMP_SAMPLE_RATE
startThreadDumps(),
Constant Field Valuespublic static final String DEFAULT_THREAD_DUMP_SAMPLE_RATE
| Constructor Detail |
|---|
public ThreadUtils()
| Method Detail |
|---|
public static void startThreadDumps()
LOG at the Log.info(Object) level. This also
checks for thread deadlocks during each logging period.
The sample period is defined by the system property
THREAD_DUMP_SAMPLE_RATE
This method is idempotent
public static boolean findDeadlocks()
System.out.
true if a deadlock was foundpublic static void dumpThreads()
System.out.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||