public class UnboundLdapConnectionPool
extends org.apache.commons.pool.impl.GenericObjectPool<org.apache.directory.ldap.client.api.LdapConnection>
This class is just a wrapper around the commons GenericObjectPool, and has a more meaningful name to represent the pool type.
DEFAULT_LIFO, DEFAULT_MAX_ACTIVE, DEFAULT_MAX_IDLE, DEFAULT_MAX_WAIT, DEFAULT_MIN_EVICTABLE_IDLE_TIME_MILLIS, DEFAULT_MIN_IDLE, DEFAULT_NUM_TESTS_PER_EVICTION_RUN, DEFAULT_SOFT_MIN_EVICTABLE_IDLE_TIME_MILLIS, DEFAULT_TEST_ON_BORROW, DEFAULT_TEST_ON_RETURN, DEFAULT_TEST_WHILE_IDLE, DEFAULT_TIME_BETWEEN_EVICTION_RUNS_MILLIS, DEFAULT_WHEN_EXHAUSTED_ACTION, WHEN_EXHAUSTED_BLOCK, WHEN_EXHAUSTED_FAIL, WHEN_EXHAUSTED_GROW
Constructor and Description |
---|
UnboundLdapConnectionPool(PoolableUnboundConnectionFactory factory)
Instantiates a new LDAP connection pool.
|
Modifier and Type | Method and Description |
---|---|
org.apache.directory.ldap.client.api.LdapConnection |
getConnection()
Gives a Unbound LdapConnection fetched from the pool.
|
void |
releaseConnection(org.apache.directory.ldap.client.api.LdapConnection connection)
Places the given LdapConnection back in the pool.
|
addObject, borrowObject, clear, close, evict, getLifo, getMaxActive, getMaxIdle, getMaxWait, getMinEvictableIdleTimeMillis, getMinIdle, getNumActive, getNumIdle, getNumTestsPerEvictionRun, getSoftMinEvictableIdleTimeMillis, getTestOnBorrow, getTestOnReturn, getTestWhileIdle, getTimeBetweenEvictionRunsMillis, getWhenExhaustedAction, invalidateObject, returnObject, setConfig, setFactory, setLifo, setMaxActive, setMaxIdle, setMaxWait, setMinEvictableIdleTimeMillis, setMinIdle, setNumTestsPerEvictionRun, setSoftMinEvictableIdleTimeMillis, setTestOnBorrow, setTestOnReturn, setTestWhileIdle, setTimeBetweenEvictionRunsMillis, setWhenExhaustedAction, startEvictor
public UnboundLdapConnectionPool(PoolableUnboundConnectionFactory factory)
factory
- the LDAP connection factorypublic org.apache.directory.ldap.client.api.LdapConnection getConnection() throws Exception
Exception
- if an error occurs while obtaining a connection from the factorypublic void releaseConnection(org.apache.directory.ldap.client.api.LdapConnection connection) throws Exception
connection
- the LdapConnection to be releasedException
- if an error occurs while releasing the connectionCopyright © 2012–2018 The Apache Software Foundation. All rights reserved.