程序包 com.sh.util

类 ThreadUtil

java.lang.Object
com.sh.util.ThreadUtil

public class ThreadUtil extends Object

Description: 线程工具类

Title:聚天业务架构平台(SHGather)

从以下版本开始:
Nov 21, 2013
  • 构造器详细资料

    • ThreadUtil

      public ThreadUtil()
  • 方法详细资料

    • getThreadByName

      public static Thread getThreadByName(String threadName)
      通过名称找到线程
      参数:
      threadName - 流程名称
      返回:
      Thread
    • getThreadById

      public static Thread getThreadById(long id)
      通过名称找到线程
      参数:
      id - 线程编号
      返回:
      Thread
    • getAllStatckInfo

      public static String getAllStatckInfo()
      获取所有线程的堆栈信息
      返回:
      String
    • getStackTraceInfo

      public static String getStackTraceInfo(StackTraceElement[] stackArray)
      获取堆栈中的消息
      参数:
      stackArray - StackTraceElement[]
      返回:
      String
    • getExceptionStackInfo

      public static String getExceptionStackInfo(Exception _ex)
      获取异常堆栈里的消息
      参数:
      _ex - 异常信息
      返回:
      String
    • getCallerClassInfo

      public static String getCallerClassInfo()
      自动获取classinfo
      返回:
      String
    • getCallerClassInfo

      public static String getCallerClassInfo(List<String> ignoreClassNameList)
    • getCallerClassInfo

      public static String getCallerClassInfo(List<String> ignoreClassNameList, int deep)
      自动获取当前调用类的堆栈信息
      参数:
      ignoreClassNameList -
      deep -
      返回:
      String