Class PrunePoolTask<T extends BaseLdap>

  • Type Parameters:
    T - type of ldap object
    All Implemented Interfaces:
    java.lang.Runnable

    public class PrunePoolTask<T extends BaseLdap>
    extends java.util.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: 2790 $ $Date: 2013-07-11 19:50:53 +0200 (Thu, 11 Jul 2013) $
    Author:
    Middleware Services
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected org.apache.commons.logging.Log logger
      Log for this class.
    • Constructor Summary

      Constructors 
      Constructor Description
      PrunePoolTask​(LdapPool<T> lp)
      Creates a new task to periodically prune the supplied pool.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      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 java.lang.Runnable
        Specified by:
        run in class java.util.TimerTask