public class LdapConnectionPool extends org.apache.commons.pool2.impl.GenericObjectPool<LdapConnection>
| Modifier and Type | Field and Description |
|---|---|
private org.apache.commons.pool2.PooledObjectFactory<LdapConnection> |
factory |
private static org.slf4j.Logger |
LOG |
| Constructor and Description |
|---|
LdapConnectionPool(LdapConnectionConfig connectionConfig,
org.apache.directory.api.ldap.codec.api.LdapApiService apiService,
long timeout)
Instantiates a new LDAP connection pool.
|
LdapConnectionPool(LdapConnectionConfig connectionConfig,
org.apache.directory.api.ldap.codec.api.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.
|
org.apache.directory.api.ldap.codec.api.LdapApiService |
getLdapApiService()
Returns the LdapApiService instance used by this connection pool.
|
private static ValidatingPoolableLdapConnectionFactory |
newPoolableConnectionFactory(LdapConnectionConfig connectionConfig,
org.apache.directory.api.ldap.codec.api.LdapApiService apiService,
long timeout) |
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, isAbandonedConfig, listAllObjects, preparePool, returnObject, setAbandonedConfig, setConfig, setMaxIdle, setMinIdle, toStringAppendFields, usegetBlockWhenExhausted, 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, markReturningState, setBlockWhenExhausted, setConfig, setEvictionPolicy, setEvictionPolicyClassName, setEvictionPolicyClassName, setEvictorShutdownTimeoutMillis, setLifo, setMaxTotal, setMaxWaitMillis, setMinEvictableIdleTimeMillis, setNumTestsPerEvictionRun, setSoftMinEvictableIdleTimeMillis, setSwallowedExceptionListener, setTestOnBorrow, setTestOnCreate, setTestOnReturn, setTestWhileIdle, setTimeBetweenEvictionRunsMillisclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetBlockWhenExhausted, getBorrowedCount, getCreatedCount, getCreationStackTrace, getDestroyedByBorrowValidationCount, getDestroyedByEvictorCount, getDestroyedCount, getFairness, getLifo, getMaxBorrowWaitTimeMillis, getMaxTotal, getMaxWaitMillis, getMeanActiveTimeMillis, getMeanBorrowWaitTimeMillis, getMeanIdleTimeMillis, getMinEvictableIdleTimeMillis, getNumTestsPerEvictionRun, getReturnedCount, getTestOnBorrow, getTestOnCreate, getTestOnReturn, getTestWhileIdle, getTimeBetweenEvictionRunsMillis, isClosedprivate static final org.slf4j.Logger LOG
private org.apache.commons.pool2.PooledObjectFactory<LdapConnection> factory
public LdapConnectionPool(LdapConnectionConfig connectionConfig, org.apache.directory.api.ldap.codec.api.LdapApiService apiService, long timeout)
connectionConfig - The connection configurationapiService - The api service (codec)timeout - The connection timeout in millispublic LdapConnectionPool(LdapConnectionConfig connectionConfig, org.apache.directory.api.ldap.codec.api.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 org.apache.directory.api.ldap.codec.api.LdapApiService getLdapApiService()
public LdapConnection getConnection() throws org.apache.directory.api.ldap.model.exception.LdapException
org.apache.directory.api.ldap.model.exception.LdapException - if an error occurs while obtaining a connection from the factoryprivate static ValidatingPoolableLdapConnectionFactory newPoolableConnectionFactory(LdapConnectionConfig connectionConfig, org.apache.directory.api.ldap.codec.api.LdapApiService apiService, long timeout)
public void releaseConnection(LdapConnection connection) throws org.apache.directory.api.ldap.model.exception.LdapException
connection - the LdapConnection to be releasedorg.apache.directory.api.ldap.model.exception.LdapException - if an error occurs while releasing the connectionCopyright © 2009–2019 The Apache Software Foundation. All rights reserved.