java.lang.Object
org.apache.tomcat.util.threads.ThreadPool.MonitorRunnable
- All Implemented Interfaces:
- java.lang.Runnable
- Enclosing class:
- ThreadPool
- public static class ThreadPool.MonitorRunnable
- extends java.lang.Object
- implements java.lang.Runnable
Periodically execute an action - cleanup in this case
|
Method Summary |
void |
run()
This method will be called by whoever wishes to run your class
implementing Runnable. |
void |
setInterval(int i)
|
void |
start()
|
void |
stop()
|
void |
terminate()
Stop the monitor |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
p
ThreadPool p
t
java.lang.Thread t
interval
int interval
shouldTerminate
boolean shouldTerminate
ThreadPool.MonitorRunnable
ThreadPool.MonitorRunnable(ThreadPool p)
start
public void start()
setInterval
public void setInterval(int i)
run
public void run()
- Description copied from interface:
java.lang.Runnable
- This method will be called by whoever wishes to run your class
implementing Runnable. Note that there are no restrictions on what
you are allowed to do in the run method, except that you cannot
throw a checked exception.
- Specified by:
run in interface java.lang.Runnable
stop
public void stop()
terminate
public void terminate()
- Stop the monitor