程序包 com.sh.util
类 ThreadUtil
java.lang.Object
com.sh.util.ThreadUtil
Description: 线程工具类
Title:聚天业务架构平台(SHGather)
- 从以下版本开始:
- Nov 21, 2013
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static String获取所有线程的堆栈信息static String自动获取classinfostatic StringgetCallerClassInfo(List<String> ignoreClassNameList) static StringgetCallerClassInfo(List<String> ignoreClassNameList, int deep) 自动获取当前调用类的堆栈信息static String获取异常堆栈里的消息static StringgetStackTraceInfo(StackTraceElement[] stackArray) 获取堆栈中的消息static ThreadgetThreadById(long id) 通过名称找到线程static ThreadgetThreadByName(String threadName) 通过名称找到线程
-
构造器详细资料
-
ThreadUtil
public ThreadUtil()
-
-
方法详细资料
-
getThreadByName
通过名称找到线程- 参数:
threadName- 流程名称- 返回:
- Thread
-
getThreadById
通过名称找到线程- 参数:
id- 线程编号- 返回:
- Thread
-
getAllStatckInfo
获取所有线程的堆栈信息- 返回:
- String
-
getStackTraceInfo
获取堆栈中的消息- 参数:
stackArray- StackTraceElement[]- 返回:
- String
-
getExceptionStackInfo
获取异常堆栈里的消息- 参数:
_ex- 异常信息- 返回:
- String
-
getCallerClassInfo
自动获取classinfo- 返回:
String
-
getCallerClassInfo
-
getCallerClassInfo
自动获取当前调用类的堆栈信息- 参数:
ignoreClassNameList-deep-- 返回:
String
-