com.cafesoft.core.pool
Class ObjectPoolCleanUpTimerTask

java.lang.Object
  |
  +--java.util.TimerTask
        |
        +--com.cafesoft.core.pool.ObjectPoolCleanUpTimerTask
All Implemented Interfaces:
Runnable

public class ObjectPoolCleanUpTimerTask
extends TimerTask

TimerTask that cleans up idle objects that are not being used.

Since:
2/13/03
See Also:
TimerTask

Constructor Summary
ObjectPoolCleanUpTimerTask(ObjectPool objectPool)
          Create a new ObjectPoolCleanUpTimerTask object.
ObjectPoolCleanUpTimerTask(ObjectPool objectPool, int shrinkIncrement)
          Create a new ObjectPoolCleanUpTimerTask object.
 
Method Summary
 void run()
          The action to be performed by this timer task.
 void setShrinkIncrement(int shrinkIncrement)
          Set the shrink increment
 
Methods inherited from class java.util.TimerTask
cancel, scheduledExecutionTime
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObjectPoolCleanUpTimerTask

public ObjectPoolCleanUpTimerTask(ObjectPool objectPool)
Create a new ObjectPoolCleanUpTimerTask object.

Parameters:
objectPool - the object pool to clean up

ObjectPoolCleanUpTimerTask

public ObjectPoolCleanUpTimerTask(ObjectPool objectPool,
                                  int shrinkIncrement)
Create a new ObjectPoolCleanUpTimerTask object.

Parameters:
objectPool - the object pool to clean up
shrinkIncrement - the amount to shrink the pool by
Method Detail

setShrinkIncrement

public void setShrinkIncrement(int shrinkIncrement)
Set the shrink increment

Parameters:
shrinkIncrement - the new shrink increment

run

public void run()
The action to be performed by this timer task.

Specified by:
run in interface Runnable
Specified by:
run in class TimerTask


Generated on 8:41:50 AM June 06, 2005, © 1996-2005 Cafésoft LLC. All rights reserved.