public class LdapConnectionPool extends org.apache.commons.pool2.impl.GenericObjectPool<LdapConnection>
Constructor and Description |
---|
LdapConnectionPool(LdapConnectionConfig connectionConfig,
LdapApiService apiService,
long timeout)
Instantiates a new LDAP connection pool.
|
LdapConnectionPool(LdapConnectionConfig connectionConfig,
LdapApiService apiService,
long timeout,
org.apache.commons.pool2.impl.GenericObjectPoolConfig poolConfig)
Instantiates a new LDAP connection pool.
|
LdapConnectionPool(org.apache.commons.pool2.PooledObjectFactory<LdapConnection> factory)
Instantiates a new LDAP connection pool.
|
LdapConnectionPool(org.apache.commons.pool2.PooledObjectFactory<LdapConnection> factory,
org.apache.commons.pool2.impl.GenericObjectPoolConfig poolConfig)
Instantiates a new LDAP connection pool.
|
Modifier and Type | Method and Description |
---|---|
LdapConnection |
getConnection()
Gives a LdapConnection fetched from the pool.
|
LdapApiService |
getLdapApiService()
Returns the LdapApiService instance used by this connection pool.
|
void |
releaseConnection(LdapConnection connection)
Places the given LdapConnection back in the pool.
|
addObject, borrowObject, borrowObject, clear, close, evict, getFactory, getFactoryType, getLogAbandoned, getMaxIdle, getMinIdle, getNumActive, getNumIdle, getNumWaiters, getRemoveAbandonedOnBorrow, getRemoveAbandonedOnMaintenance, getRemoveAbandonedTimeout, invalidateObject, invalidateObject, isAbandonedConfig, listAllObjects, preparePool, returnObject, setAbandonedConfig, setConfig, setMaxIdle, setMinIdle, use
getBlockWhenExhausted, getBorrowedCount, getCreatedCount, getCreationStackTrace, getDestroyedByBorrowValidationCount, getDestroyedByEvictorCount, getDestroyedCount, getEvictionPolicy, getEvictionPolicyClassName, getEvictorShutdownTimeoutMillis, getFairness, getJmxName, getLifo, getMaxBorrowWaitTimeMillis, getMaxTotal, getMaxWaitMillis, getMeanActiveTimeMillis, getMeanBorrowWaitTimeMillis, getMeanIdleTimeMillis, getMinEvictableIdleTimeMillis, getNumTestsPerEvictionRun, getReturnedCount, getSoftMinEvictableIdleTimeMillis, getSwallowedExceptionListener, getTestOnBorrow, getTestOnCreate, getTestOnReturn, getTestWhileIdle, getTimeBetweenEvictionRunsMillis, isClosed, setBlockWhenExhausted, setEvictionPolicy, setEvictionPolicyClassName, setEvictionPolicyClassName, setEvictorShutdownTimeoutMillis, setLifo, setMaxTotal, setMaxWaitMillis, setMinEvictableIdleTimeMillis, setNumTestsPerEvictionRun, setSoftMinEvictableIdleTimeMillis, setSwallowedExceptionListener, setTestOnBorrow, setTestOnCreate, setTestOnReturn, setTestWhileIdle, setTimeBetweenEvictionRunsMillis
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
getBlockWhenExhausted, getBorrowedCount, getCreatedCount, getCreationStackTrace, getDestroyedByBorrowValidationCount, getDestroyedByEvictorCount, getDestroyedCount, getFairness, getLifo, getMaxBorrowWaitTimeMillis, getMaxTotal, getMaxWaitMillis, getMeanActiveTimeMillis, getMeanBorrowWaitTimeMillis, getMeanIdleTimeMillis, getMinEvictableIdleTimeMillis, getNumTestsPerEvictionRun, getReturnedCount, getTestOnBorrow, getTestOnCreate, getTestOnReturn, getTestWhileIdle, getTimeBetweenEvictionRunsMillis, isClosed
public LdapConnectionPool(LdapConnectionConfig connectionConfig, LdapApiService apiService, long timeout)
connectionConfig
- The connection configurationapiService
- The api service (codec)timeout
- The connection timeout in millispublic LdapConnectionPool(LdapConnectionConfig connectionConfig, LdapApiService apiService, long timeout, org.apache.commons.pool2.impl.GenericObjectPoolConfig poolConfig)
connectionConfig
- The connection configurationapiService
- The api service (codec)timeout
- The connection timeout in millispoolConfig
- The pool configurationpublic LdapConnectionPool(org.apache.commons.pool2.PooledObjectFactory<LdapConnection> factory)
factory
- The LDAP connection factorypublic LdapConnectionPool(org.apache.commons.pool2.PooledObjectFactory<LdapConnection> factory, org.apache.commons.pool2.impl.GenericObjectPoolConfig poolConfig)
factory
- The LDAP connection factorypoolConfig
- The pool configurationpublic LdapApiService getLdapApiService()
public LdapConnection getConnection() throws LdapException
LdapException
- if an error occurs while obtaining a connection from the factorypublic void releaseConnection(LdapConnection connection) throws LdapException
connection
- the LdapConnection to be releasedLdapException
- if an error occurs while releasing the connectionCopyright © 2003–2021 The Apache Software Foundation. All rights reserved.