org.ldaptive.pool
Class SoftLimitConnectionPool
java.lang.Object
org.ldaptive.pool.AbstractPool<Connection>
org.ldaptive.pool.AbstractConnectionPool
org.ldaptive.pool.BlockingConnectionPool
org.ldaptive.pool.SoftLimitConnectionPool
- All Implemented Interfaces:
- ConnectionPool
public class SoftLimitConnectionPool
- extends BlockingConnectionPool
Implements a pool of connections 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 strategy. See PruneStrategy. This implementation should be used
when you have some flexibility in the number of connections that can be
created to handle spikes in load. See AbstractConnectionPool. Note
that this pool will begin blocking if it cannot create new connections.
- Version:
- $Revision: 2967 $ $Date: 2014-04-09 16:37:01 -0400 (Wed, 09 Apr 2014) $
- Author:
- Middleware Services
| Methods inherited from class org.ldaptive.pool.AbstractConnectionPool |
activateAndValidateConnection, activeCount, availableCount, close, createActiveConnection, createActiveConnection, createAvailableConnection, createAvailableConnection, createConnection, createConnection, createConnectionProxy, finalize, getConnectionFactory, getConnectOnCreate, getFailFastInitialize, getPooledConnectionStatistics, getQueueType, grow, grow, initialize, isInitialized, prune, removeActiveConnection, removeAvailableAndActiveConnection, removeAvailableConnection, retrieveConnectionProxy, setConnectionFactory, setConnectOnCreate, setFailFastInitialize, setQueueType, toString, validate, validateAndPassivateConnection |
| Methods inherited from class org.ldaptive.pool.AbstractPool |
activate, getActivator, getName, getPassivator, getPoolConfig, getPruneStrategy, getValidator, passivate, setActivator, setName, setPassivator, setPoolConfig, setPruneStrategy, setValidator, validate |
SoftLimitConnectionPool
public SoftLimitConnectionPool()
- Creates a new soft limit pool.
SoftLimitConnectionPool
public SoftLimitConnectionPool(DefaultConnectionFactory cf)
- Creates a new soft limit pool.
- Parameters:
cf - connection factory
SoftLimitConnectionPool
public SoftLimitConnectionPool(PoolConfig pc,
DefaultConnectionFactory cf)
- Creates a new soft limit pool.
- Parameters:
pc - pool configurationcf - connection factory
getConnection
public Connection getConnection()
throws PoolException
- Returns a connection from the pool.
- Specified by:
getConnection in interface ConnectionPool- Overrides:
getConnection in class BlockingConnectionPool
- Returns:
- connection
- Throws:
PoolException - 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-2017 Virginia Tech. All Rights Reserved.