org.rhq.enterprise.agent
Class VMHealthCheckThread

java.lang.Object
  extended by java.lang.Thread
      extended by org.rhq.enterprise.agent.VMHealthCheckThread
All Implemented Interfaces:
Runnable

public class VMHealthCheckThread
extends Thread

This is a thread that will periodically check the health of the VM (e.g. check the memory usage within the VM to detect if memory is critically low), and if the health is poor it will put the agent into hibernate mode, which will essentially shutdown the agent, let it pause for some amount of time, then restart the agent. This will hopefully clear up the poor VM condition.

Author:
John Mazzitelli

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
VMHealthCheckThread(AgentMain agent)
           
 
Method Summary
 void run()
           
 void stopChecking()
          Tells this thread to stop checking.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

VMHealthCheckThread

public VMHealthCheckThread(AgentMain agent)
Method Detail

stopChecking

public void stopChecking()
Tells this thread to stop checking. This will block and wait for the thread to die.


run

public void run()
Specified by:
run in interface Runnable
Overrides:
run in class Thread


Copyright © 2008-2011 Red Hat, Inc.. All Rights Reserved.