Package org.nuxeo.runtime.management.jvm
Class ThreadDeadlocksDetector
- java.lang.Object
-
- org.nuxeo.runtime.management.jvm.ThreadDeadlocksDetector
-
public class ThreadDeadlocksDetector extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ThreadDeadlocksDetector.JVM16Printer
static class
ThreadDeadlocksDetector.KillListener
static interface
ThreadDeadlocksDetector.Listener
static interface
ThreadDeadlocksDetector.Printer
protected class
ThreadDeadlocksDetector.Task
-
Field Summary
Fields Modifier and Type Field Description protected static Log
log
protected ThreadMXBean
mgmt
protected ThreadDeadlocksDetector.Printer
printer
protected Timer
timer
-
Constructor Summary
Constructors Constructor Description ThreadDeadlocksDetector()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
cancel()
long[]
detectThreadLock()
File
dump(long[] lockedIds)
protected static Map<Long,Thread>
getThreads()
static void
killThreads(Set<Long> ids)
protected static ThreadGroup
rootGroup(ThreadGroup group)
void
schedule(long period, ThreadDeadlocksDetector.Listener listener)
-
-
-
Field Detail
-
timer
protected Timer timer
-
mgmt
protected final ThreadMXBean mgmt
-
printer
protected final ThreadDeadlocksDetector.Printer printer
-
log
protected static final Log log
-
-
Method Detail
-
dump
public File dump(long[] lockedIds) throws IOException
- Throws:
IOException
-
detectThreadLock
public long[] detectThreadLock()
-
schedule
public void schedule(long period, ThreadDeadlocksDetector.Listener listener)
-
cancel
public void cancel()
-
rootGroup
protected static ThreadGroup rootGroup(ThreadGroup group)
-
-