|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.vt.middleware.ldap.pool.AbstractLdapPool<Ldap>
edu.vt.middleware.ldap.pool.SharedLdapPool
public class SharedLdapPool
SharedLdapPool implements a pool of ldap objects that has a set
minimum and maximum size. The pool will not grow beyond the maximum size and
when the pool is exhausted, requests for new objects will be serviced by
objects that are already in use. Since Ldap is
a thread safe object this implementation leverages that by sharing ldap
objects among requests. See LdapContext.newInstance(Control[]). This implementation
should be used when you want some control over the maximum number of ldap
connections, but can tolerate some new connections under high load. See
AbstractLdapPool.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class edu.vt.middleware.ldap.pool.AbstractLdapPool |
|---|
AbstractLdapPool.PooledLdap<T extends BaseLdap> |
| Field Summary |
|---|
| Fields inherited from class edu.vt.middleware.ldap.pool.AbstractLdapPool |
|---|
active, available, checkInLock, checkOutLock, ldapFactory, logger, poolConfig, poolLock, poolNotEmpty |
| Constructor Summary | |
|---|---|
SharedLdapPool()
Creates a new ldap pool using DefaultLdapFactory. |
|
SharedLdapPool(LdapFactory<Ldap> lf)
Creates a new ldap pool with the supplied ldap factory. |
|
SharedLdapPool(LdapPoolConfig lpc,
LdapFactory<Ldap> lf)
Creates a new ldap pool with the supplied ldap config and factory. |
|
| Method Summary | |
|---|---|
void |
checkIn(Ldap l)
Returns an ldap object to the pool. |
Ldap |
checkOut()
Returns an ldap object from the pool. |
protected Ldap |
retrieveAvailable()
This attempts to retrieve an ldap object from the available queue. |
| 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 |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SharedLdapPool()
DefaultLdapFactory.
public SharedLdapPool(LdapFactory<Ldap> lf)
lf - ldap factory
public SharedLdapPool(LdapPoolConfig lpc,
LdapFactory<Ldap> lf)
lpc - ldap pool configurationlf - ldap factory| Method Detail |
|---|
public Ldap checkOut()
throws LdapPoolException
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 interruptedprotected Ldap retrieveAvailable()
IllegalStateException - if an object cannot be removed from the
available queuepublic void checkIn(Ldap l)
l - ldap object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||