## org.apache.tomcat.util.threads
Class Expirer

    java.lang.Object
      org.apache.tomcat.util.threads.Expirer

All Implemented Interfaces:
  ThreadPoolRunnable

public final class Expirer
extends java.lang.Object
implements ThreadPoolRunnable

Expire unused objects.

Nested Class Summary
`static interface` `Expirer.ExpireCallback`

Constructor Summary
`Expirer()`

Method Summary
`void` `addManagedObject(TimeStamp ts)`
`int` `getCheckInterval()`
`java.lang.Object[]` `getInitData()` Called when this object is first loaded in the thread pool.
`void` `removeManagedObject(TimeStamp ts)`
`void` `runIt(java.lang.Object[] td)` This method will be executed in one of the pool's threads.
`void` `setCheckInterval(int checkInterval)`
`void` `setExpireCallback(Expirer.ExpireCallback cb)`
`void` `start()`
`void` `stop()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Expirer

    public Expirer()

Method Detail

### getCheckInterval

    public int getCheckInterval()

### setCheckInterval

    public void setCheckInterval(int checkInterval)

### setExpireCallback

    public void setExpireCallback(Expirer.ExpireCallback cb)

### addManagedObject

    public void addManagedObject(TimeStamp ts)

### removeManagedObject

    public void removeManagedObject(TimeStamp ts)

### start

    public void start()

### stop

    public void stop()

### getInitData

    public java.lang.Object[] getInitData()

  Description copied from interface: `ThreadPoolRunnable`
  Called when this object is first loaded in the thread pool. Important: all workers in a pool must be of the same type, otherwise the mechanism becomes more complex.

  Specified by:
    `getInitData` in interface `ThreadPoolRunnable`

### runIt

    public void runIt(java.lang.Object[] td)

  Description copied from interface: `ThreadPoolRunnable`
  This method will be executed in one of the pool's threads. The thread will be returned to the pool.

  Specified by:
    `runIt` in interface `ThreadPoolRunnable`

Copyright © 2000-2003 Apache Software Foundation. All Rights Reserved.