edu.vt.middleware.ldap.pool
Class PrunePoolTask<T extends BaseLdap>

java.lang.Object
  extended by java.util.TimerTask
      extended by edu.vt.middleware.ldap.pool.PrunePoolTask<T>
Type Parameters:
T - type of ldap object
All Implemented Interfaces:
Runnable

public class PrunePoolTask<T extends BaseLdap>
extends TimerTask

PrunePoolTask is a periodic task that removes available ldap objects from the pool if the objects have been in the pool longer than a configured expiration time and the pool size is above it's configured minimum. Task will skip execution if the pool has any active objects.

Version:
$Revision: 1330 $ $Date: 2010-05-23 18:10:53 -0400 (Sun, 23 May 2010) $
Author:
Middleware Services

Field Summary
protected  org.apache.commons.logging.Log logger
          Log for this class.
 
Constructor Summary
PrunePoolTask(LdapPool<T> lp)
          Creates a new task to periodically prune the supplied pool.
 
Method Summary
 void run()
          This attempts to remove idle objects from a pool.
 
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
 

Field Detail

logger

protected final org.apache.commons.logging.Log logger
Log for this class.

Constructor Detail

PrunePoolTask

public PrunePoolTask(LdapPool<T> lp)
Creates a new task to periodically prune the supplied pool.

Parameters:
lp - ldap pool to periodically inspect
Method Detail

run

public void run()
This attempts to remove idle objects from a pool. See LdapPool.prune().

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


Copyright © 2003-2010 Virginia Tech. All Rights Reserved.