edu.vt.middleware.ldap.pool
Class SoftLimitLdapPool
java.lang.Object
edu.vt.middleware.ldap.pool.AbstractLdapPool<Ldap>
edu.vt.middleware.ldap.pool.BlockingLdapPool
edu.vt.middleware.ldap.pool.SoftLimitLdapPool
- All Implemented Interfaces:
- LdapPool<Ldap>
public class SoftLimitLdapPool
- extends BlockingLdapPool
SoftLimitLdapPool implements a pool of ldap objects that has a
set minimum and maximum size. The pool will grow beyond it's maximum size as
necessary based on it's current load. Pool size will return to it's minimum
based on the configuration of the prune timer. See LdapPoolConfig.setPruneTimerPeriod(long) and LdapPoolConfig.setExpirationTime(long). This implementation should be used when
you have some flexibility in the number of ldap connections that can be
created to handle spikes in load. See AbstractLdapPool. Note that
this pool will begin blocking if it cannot create new ldap connections.
- Version:
- $Revision: 1330 $ $Date: 2010-05-23 18:10:53 -0400 (Sun, 23 May 2010) $
- Author:
- Middleware Services
|
Method Summary |
Ldap |
checkOut()
Returns an ldap object from the pool. |
| Methods inherited from class edu.vt.middleware.ldap.pool.AbstractLdapPool |
activateAndValidate, activeCount, availableCount, close, createActive, createAvailable, createAvailableAndActive, finalize, getLdapPoolConfig, initialize, prune, removeActive, removeAvailable, removeAvailableAndActive, setPoolTimer, validate, validateAndPassivate |
SoftLimitLdapPool
public SoftLimitLdapPool()
- Creates a new ldap pool using
DefaultLdapFactory.
SoftLimitLdapPool
public SoftLimitLdapPool(LdapFactory<Ldap> lf)
- Creates a new ldap pool with the supplied ldap factory.
- Parameters:
lf - ldap factory
SoftLimitLdapPool
public SoftLimitLdapPool(LdapPoolConfig lpc,
LdapFactory<Ldap> lf)
- Creates a new ldap pool with the supplied ldap config and factory.
- Parameters:
lpc - ldap pool configurationlf - ldap factory
checkOut
public Ldap checkOut()
throws LdapPoolException
- Returns an ldap object from the pool.
- Specified by:
checkOut in interface LdapPool<Ldap>- Overrides:
checkOut in class BlockingLdapPool
- Returns:
- ldap object
- Throws:
LdapPoolException - if this operation fails
BlockingTimeoutException - if this pool is configured with a block
time and it occurs
PoolInterruptedException - if this pool is configured with a block
time and the current thread is interrupted
Copyright © 2003-2010 Virginia Tech. All Rights Reserved.