com.notuvy.thread
Class ThreadMonitor
java.lang.Object
com.notuvy.thread.ThreadMonitor
public class ThreadMonitor
- extends Object
Allow heartbeat monitoring of a thread.
- Author:
- murali
LOG
protected static final org.apache.log4j.Logger LOG
ALL
public static final Collection<ThreadMonitor> ALL
update
public static void update(String pString)
myMonitor
protected static ThreadMonitor myMonitor()
update
public static void update()
allMonitoredThreads
public static List<ThreadMonitor> allMonitoredThreads()
- Return the list of all monitored threads
- Returns:
- A clone of the full list so that list operations are thread-safe.
toReport
public static String toReport()
getThread
public Thread getThread()
getLastHeartbeat
public long getLastHeartbeat()
getStatus
public String getStatus()
getTimeZone
public TimeZone getTimeZone()
setTimeZone
public void setTimeZone(TimeZone pTimeZone)
updateStatus
public void updateStatus(String pStatus)
- Note that thread activity has taken place.
- Parameters:
pStatus
- The string note to describe the thread activity.
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2013. All Rights Reserved.