| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||

public interface IConnectionPool
A connection pool manages a pool of open connections. 
 Typically, a connection pool will be used on the client-side if connections for the 
 same server (address) will be created in a serial manner in a sort period of time. 
 By pooling such connections the overhead of establishing a connection will be avoided
 For pool management reasons, timeouts can be defined. The
 IdleTimeout defines the max idle time in the pool. After this time the
 free connection will be closed. In the same way, the max living time
 defines the timeout of the connection. If a free connection exceeds
 this time, the connection will be closed.  
 Additional the max size of the active connections can be defined.
 If a connection is requested and the max limit of the active connection
 is reached, the request will be blocked until a connection becomes free
 or the maxWaitTime will be reached.
| Field Summary | |
|---|---|
| static int | DEFAULT_CREATION_TIMEOUT_MILLIS | 
| static int | DEFAULT_IDLE_TIMEOUT_MILLIS | 
| static int | DEFAULT_LIFE_TIMEOUT_MILLIS | 
| static int | DEFAULT_MAX_ACTIVE | 
| static int | DEFAULT_MAX_IDLE | 
| static long | DEFAULT_MAX_WAIT_MILLIS | 
| Method Summary | |
|---|---|
|  void | addListener(ILifeCycle listener)adds a listener | 
|  List<String> | getActiveConnectionInfos()get a info list about the active connections | 
|  long | getCreationMaxWaitMillis()get the max waiting by retrieving a resource | 
|  List<String> | getIdleConnectionInfos()get a info list about the idle connections | 
|  int | getMaxActive()return the number of max active resources | 
|  int | getMaxIdle()get the number of max idling resources | 
|  int | getNumActive()get the current number of the active resources | 
|  int | getNumCreated()get the number of the created resources | 
|  int | getNumDestroyed()get the number of the destroyed resources | 
|  int | getNumIdle()get the current number of idling resources | 
|  int | getNumTimeoutPooledMaxIdleTime()get the number of timeouts caused by the pool idle timeout | 
|  int | getNumTimeoutPooledMaxLifeTime()get the number of timeouts caused by the pool life timeout | 
|  int | getPooledMaxIdleTimeMillis()get the idle time out | 
|  int | getPooledMaxLifeTimeMillis()get the life timeout of a resource | 
|  boolean | isOpen()returns true, is pool is open | 
|  boolean | removeListener(ILifeCycle listener)removes a listener | 
|  void | setCreationMaxWaitMillis(long maxWaitMillis)set the max waiting by retrieving a resource | 
|  void | setMaxActive(int maxActive)set the number of max active resources | 
|  void | setMaxIdle(int maxIdle)set the number of max idling resources | 
|  void | setPooledMaxIdleTimeMillis(int idleTimeoutMillis)set the idle time out of a resource within the pool | 
|  void | setPooledMaxLifeTimeMillis(int lifeTimeoutMillis)set the life timeout of a resource | 
| Methods inherited from interface java.io.Closeable | 
|---|
| close | 
| Field Detail | 
|---|
static final int DEFAULT_MAX_ACTIVE
static final int DEFAULT_MAX_IDLE
static final long DEFAULT_MAX_WAIT_MILLIS
static final int DEFAULT_IDLE_TIMEOUT_MILLIS
static final int DEFAULT_LIFE_TIMEOUT_MILLIS
static final int DEFAULT_CREATION_TIMEOUT_MILLIS
| Method Detail | 
|---|
boolean isOpen()
void addListener(ILifeCycle listener)
listener - the listener to addboolean removeListener(ILifeCycle listener)
listener - the listener to remove
int getMaxActive()
void setMaxActive(int maxActive)
maxActive - the number of max active resourceslong getCreationMaxWaitMillis()
void setCreationMaxWaitMillis(long maxWaitMillis)
maxWaitMillis - the max waiting by retrieving a resourceint getMaxIdle()
void setMaxIdle(int maxIdle)
the - number of max idling resourcesint getNumActive()
int getNumDestroyed()
int getNumTimeoutPooledMaxLifeTime()
int getNumTimeoutPooledMaxIdleTime()
int getNumCreated()
List<String> getActiveConnectionInfos()
List<String> getIdleConnectionInfos()
int getNumIdle()
int getPooledMaxIdleTimeMillis()
void setPooledMaxIdleTimeMillis(int idleTimeoutMillis)
idleTimeoutMillis - the idle time outint getPooledMaxLifeTimeMillis()
void setPooledMaxLifeTimeMillis(int lifeTimeoutMillis)
lifeTimeoutSec - the life timeout of a resource| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||