public class ThreadDumpper extends Object
| Constructor and Description |
|---|
ThreadDumpper() |
ThreadDumpper(long leastIntervalMills,
int maxStackLevel) |
| Modifier and Type | Method and Description |
|---|---|
void |
setLeastInterval(int leastIntervalSeconds)
打印ThreadDump的最小时间间隔,单位为秒,默认为0不限制.
|
void |
setMaxStackLevel(int maxStackLevel)
打印StackTrace的最大深度, 默认为8.
|
void |
threadDump(String reasonMsg)
强行打印ThreadDump,使用最轻量的采集方式,不打印锁信息
|
void |
tryThreadDump()
符合条件则打印线程栈.
|
void |
tryThreadDump(String reasonMsg)
符合条件则打印线程栈.
|
public ThreadDumpper()
public ThreadDumpper(long leastIntervalMills,
int maxStackLevel)
public void tryThreadDump()
public void tryThreadDump(String reasonMsg)
reasonMsg - 发生ThreadDump的原因public void threadDump(String reasonMsg)
public void setLeastInterval(int leastIntervalSeconds)
public void setMaxStackLevel(int maxStackLevel)
Copyright © 2018. All rights reserved.