com.beetle.framework.appsrv
类 AppThreadMonitor

java.lang.Object
  继承者 com.beetle.framework.appsrv.AppRunnable
      继承者 com.beetle.framework.appsrv.AppThreadMonitor
所有已实现的接口:
java.lang.Runnable

public final class AppThreadMonitor
extends AppRunnable


嵌套类摘要
static class AppThreadMonitor.MonitorInfo
          线程模块后台监控信息对象
 
方法摘要
protected  void end()
           
static java.util.HashMap getMonitorInfoCahceSnapshot()
          获取后台监控对象列表的快照
static long getMonitorLastTime()
          获取监控器最近一次工作的时间
static long getMonitorStartTime()
          获取监控器启动的时间
static boolean isStarted()
          线程监控器是否已经启动 返回true为已启动
static void putIntoCache(AppThreadImp appRunnable)
          把线程放入缓存,以便后台监控
static void removeFromCache(AppThreadImp appRunnable)
          将线程从缓存删除,以便后台不再监控
static void reStartAppThread(java.lang.String appThreadName)
          根据被监控线程的名称,重启此线程
 void run()
          线程运行主方法
static void startMonitor()
          启动后台线程监控器,重启无效
static void stopMonitor()
          停止后台线程监控器,停止后不能重启
 
从类 com.beetle.framework.appsrv.AppRunnable 继承的方法
getLastTime, getName, getStartTime, getStopFlag, getThread, interrupt, isStoped, resetIdleTime, sleep, startAsDaemon, startNow, stopBrutally, stopEvent, stopNow
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

方法详细信息

getMonitorStartTime

public static long getMonitorStartTime()
获取监控器启动的时间


getMonitorLastTime

public static long getMonitorLastTime()
获取监控器最近一次工作的时间


getMonitorInfoCahceSnapshot

public static java.util.HashMap getMonitorInfoCahceSnapshot()
获取后台监控对象列表的快照

返回:

isStarted

public static boolean isStarted()
线程监控器是否已经启动 返回true为已启动


startMonitor

public static void startMonitor()
启动后台线程监控器,重启无效


stopMonitor

public static void stopMonitor()
停止后台线程监控器,停止后不能重启


putIntoCache

public static void putIntoCache(AppThreadImp appRunnable)
把线程放入缓存,以便后台监控

参数:
appRunnable - AppRunnable

removeFromCache

public static void removeFromCache(AppThreadImp appRunnable)
将线程从缓存删除,以便后台不再监控

参数:
appRunnable - AppRunnable

end

protected void end()

reStartAppThread

public static void reStartAppThread(java.lang.String appThreadName)
根据被监控线程的名称,重启此线程

参数:
appThreadName -

run

public void run()
从类 AppRunnable 复制的描述
线程运行主方法

指定者:
接口 java.lang.Runnable 中的 run
指定者:
AppRunnable 中的 run