Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.tomcat.util.threads
Class Reaper  view Reaper download Reaper.java

java.lang.Object
  extended byjava.lang.Thread
      extended byorg.apache.tomcat.util.threads.Reaper
All Implemented Interfaces:
java.lang.Runnable

public class Reaper
extends java.lang.Thread

The reaper is a background thread with which ticks every minute and calls registered objects to allow reaping of old session data.


Nested Class Summary
 
Nested classes inherited from class java.lang.Thread
java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
(package private)  ThreadPoolRunnable[] cbacks
           
(package private)  int count
           
private  boolean daemon
           
private  long interval
           
(package private)  java.lang.Object lock
          Adding and removing callbacks is synchronized
private static org.apache.commons.logging.Log log
           
(package private) static boolean running
           
(package private)  java.lang.Object[][] tdata
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
Reaper()
           
Reaper(java.lang.String name)
           
 
Method Summary
 int addCallback(ThreadPoolRunnable c, int interval)
           
 long getDefaultIntervale()
           
 void removeCallback(int idx)
           
 void run()
          The method of Thread that will be run if there is no Runnable object associated with the Thread.
 void setDefaultInterval(long t)
           
 void startReaper()
           
 void stopReaper()
           
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, 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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

log

private static org.apache.commons.logging.Log log

daemon

private boolean daemon

interval

private long interval

cbacks

ThreadPoolRunnable[] cbacks

tdata

java.lang.Object[][] tdata

count

int count

lock

java.lang.Object lock
Adding and removing callbacks is synchronized


running

static boolean running
Constructor Detail

Reaper

public Reaper()

Reaper

public Reaper(java.lang.String name)
Method Detail

setDefaultInterval

public void setDefaultInterval(long t)

getDefaultIntervale

public long getDefaultIntervale()

addCallback

public int addCallback(ThreadPoolRunnable c,
                       int interval)

removeCallback

public void removeCallback(int idx)

startReaper

public void startReaper()

stopReaper

public void stopReaper()

run

public void run()
Description copied from class: java.lang.Thread
The method of Thread that will be run if there is no Runnable object associated with the Thread. Thread's implementation does nothing at all.