|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.informix.jdbcx.IfxCoreDataSource
com.informix.jdbcx.IfxConnectionPoolDataSource
IfxConnectionPoolDataSource is the Informix implemenation of javax.sql.ConnectionPoolDataSource. This class is embedded in the datasource that implements connection pooling.
DataSource
,
ConnectionPoolDataSource
,
IfxCoreDataSource
,
Serialized FormConstructor Summary | |
IfxConnectionPoolDataSource()
Allocates an empty IfxConnectionPoolDataSource object |
Method Summary | |
boolean |
checkIsDirect()
checkIsDirect -- check if the protocol is DirectProtocol once per CPDS |
long |
getIfxCPMAgeLimit()
Gets the life span of a connection in the Pool . |
int |
getIfxCPMInitPoolSize()
gets the initial number of connections to preallocate for the Pool Default is 0. |
int |
getIfxCPMMaxConnections()
gets the limit for the maximum number of connections Default is -1, meaning no limit restriction. |
int |
getIfxCPMMaxPoolSize()
gets the high water mark for the Pool. |
long |
getIfxCPMMinAgeLimit()
Gets the ageLimit for connections under the minimum level Default is -1, means it lives indefinitely 0, means it lives as long as the other free connections |
int |
getIfxCPMMinPoolSize()
get the minimum connections to maintain in the Pool. |
long |
getIfxCPMServiceInterval()
Gets the Pool service interval in milliseconds. |
boolean |
getIfxCPMSwitchHDRPool()
Gets the HDR Pool enabled/disabled value as boolean. |
int |
getInitialPoolSize()
get initialPoolSize |
int |
getMaxIdleTime()
get maxIdleTime |
int |
getMaxPoolSize()
get maxPoolSize |
int |
getMaxStatements()
|
int |
getMinPoolSize()
get minPoolSize |
javax.sql.PooledConnection |
getPooledConnection()
Attempt to establish a database connection. |
javax.sql.PooledConnection |
getPooledConnection(java.lang.String luser,
java.lang.String lpassword)
Attempt to establish a database connection. |
javax.sql.PooledConnection |
getPooledConnection(java.lang.String luser,
java.lang.String lpassword,
IfxConnectionEventListener listener)
Attempt to establish a database connection. |
int |
getPropertyCycle()
|
javax.naming.Reference |
getReference()
Make a reference to this IfxConnectionPooledDataSource. |
java.lang.reflect.Constructor |
getReUsableCons()
getReUsableCons -- get the directReUsableConstructor |
void |
setIfxCPMAgeLimit(long ageLimit)
Sets the property IFMX_CPM_AGELIMIT The value limits the life of a connection in the pool. |
void |
setIfxCPMInitPoolSize(int init)
Sets the property IFMX_CPM_INIT_POOLSIZE The value is the initial number of connections to preallocate for the Pool. |
void |
setIfxCPMMaxConnections(int limit)
Sets the property IFMX_CPM_MAX_CONNECTIONS The value is the maximum limit to the total number of Server connections for the Connection Pool Datasource. |
void |
setIfxCPMMaxPoolSize(int max)
Sets the property IFMX_CPM_MAX_POOLSIZE The value is the high-water mark for the Pool. |
void |
setIfxCPMMinAgeLimit(long ageLimit)
|
void |
setIfxCPMMinPoolSize(int min)
Sets the property IFMX_CPM_MIN_POOLSIZE The value is the minimum number of connections to maintain in the free Pool. |
void |
setIfxCPMServiceInterval(long interval)
|
void |
setIfxCPMSwitchHDRPool(boolean hdrFlag)
Sets the property IFMX_CPM_ENABLE_SWITCH_HDR_POOL To enable/diable automatic switching between the HDR pools |
void |
setInitialPoolSize(int init)
sets initialPoolSize |
void |
setMaxIdleTime(int ageLimit)
set maxIdleTime |
void |
setMaxPoolSize(int max)
set maxPoolSize |
void |
setMaxStatements(int limit)
|
void |
setMinPoolSize(int min)
set minPoolSize JDBC3.0 compliance |
void |
setPropertyCycle(int cyc)
|
void |
setReUsableCons(java.lang.reflect.Constructor cons)
setReUsableCons -- set the directReUsableConstructor |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.sql.ConnectionPoolDataSource |
getLoginTimeout, getLogWriter, setLoginTimeout, setLogWriter |
Constructor Detail |
public IfxConnectionPoolDataSource()
Allocates an empty IfxConnectionPoolDataSource object
Method Detail |
public void setReUsableCons(java.lang.reflect.Constructor cons)
setReUsableCons -- set the directReUsableConstructor
public java.lang.reflect.Constructor getReUsableCons()
getReUsableCons -- get the directReUsableConstructor
public javax.sql.PooledConnection getPooledConnection() throws java.sql.SQLException
Attempt to establish a database connection.
getPooledConnection
in interface javax.sql.ConnectionPoolDataSource
java.sql.SQLException
- if a database-access error occurs.
NEVER USEDpublic javax.sql.PooledConnection getPooledConnection(java.lang.String luser, java.lang.String lpassword) throws java.sql.SQLException
Attempt to establish a database connection.
getPooledConnection
in interface javax.sql.ConnectionPoolDataSource
java.sql.SQLException
- if a database-access error occurs.
DOES NOT APPEAR TO BE USEDpublic javax.sql.PooledConnection getPooledConnection(java.lang.String luser, java.lang.String lpassword, IfxConnectionEventListener listener) throws java.sql.SQLException
Attempt to establish a database connection.
java.sql.SQLException
- if a database-access error occurs.public javax.naming.Reference getReference() throws javax.naming.NamingException
Make a reference to this IfxConnectionPooledDataSource. (see similar comments in IfxDataSource)
getReference
in interface javax.naming.Referenceable
javax.naming.NamingException
- if error occurs in getting the reference.public void setIfxCPMMaxConnections(int limit)
Sets the property IFMX_CPM_MAX_CONNECTIONS The value is the maximum limit to the total number of Server connections for the Connection Pool Datasource. This total is the sum of the connections in the free Pool, plus those that are in-use and not closed by the application.
limit
- is the maximum connections allowed for the CPDS .public void setMaxStatements(int limit) throws java.sql.SQLException
throws
- exception
java.sql.SQLException
public int getIfxCPMMaxConnections()
gets the limit for the maximum number of connections Default is -1, meaning no limit restriction.
public int getMaxStatements() throws java.sql.SQLException
throws
- exception
java.sql.SQLException
public void setIfxCPMInitPoolSize(int init)
Sets the property IFMX_CPM_INIT_POOLSIZE The value is the initial number of connections to preallocate for the Pool.
init
- is the number of initial connectionspublic void setInitialPoolSize(int init)
sets initialPoolSize
public int getIfxCPMInitPoolSize()
gets the initial number of connections to preallocate for the Pool Default is 0.
public int getInitialPoolSize()
get initialPoolSize
public void setIfxCPMMaxPoolSize(int max)
Sets the property IFMX_CPM_MAX_POOLSIZE The value is the high-water mark for the Pool. When the number of connections exceed this number, any closed connection will be returned to server instead of being recycled.
max
- is the maximum connections to keep in the Pool.public void setMaxPoolSize(int max)
set maxPoolSize
public int getIfxCPMMaxPoolSize()
gets the high water mark for the Pool. Default is 100.
public int getMaxPoolSize()
get maxPoolSize
public void setIfxCPMMinPoolSize(int min)
Sets the property IFMX_CPM_MIN_POOLSIZE The value is the minimum number of connections to maintain in the free Pool. When the number of connections fall below this minumum, a background the Pool Service thread will fill it up at a specified rate (see IfxCPMServiceInterval).
min
- is the minimum connections to maintain in the Pool.public void setMinPoolSize(int min)
public int getIfxCPMMinPoolSize()
get the minimum connections to maintain in the Pool. Default is 0, means the Pool can be empty.
public int getMinPoolSize()
get minPoolSize
public void setIfxCPMMinAgeLimit(long ageLimit)
public long getIfxCPMMinAgeLimit()
Gets the ageLimit for connections under the minimum level Default is -1, means it lives indefinitely 0, means it lives as long as the other free connections
public void setIfxCPMAgeLimit(long ageLimit)
Sets the property IFMX_CPM_AGELIMIT The value limits the life of a connection in the pool.
ageLimit
- is the time in seconds.public void setMaxIdleTime(int ageLimit)
set maxIdleTime
public long getIfxCPMAgeLimit()
Gets the life span of a connection in the Pool . Default is -1, means indefinitely
public int getMaxIdleTime()
get maxIdleTime
public void setPropertyCycle(int cyc) throws java.sql.SQLException
throws
- exception
java.sql.SQLException
public int getPropertyCycle() throws java.sql.SQLException
throws
- exception
java.sql.SQLException
public void setIfxCPMServiceInterval(long interval)
public long getIfxCPMServiceInterval()
Gets the Pool service interval in milliseconds. Default is 100 milliseconds.
public void setIfxCPMSwitchHDRPool(boolean hdrFlag)
Sets the property IFMX_CPM_ENABLE_SWITCH_HDR_POOL To enable/diable automatic switching between the HDR pools
public boolean getIfxCPMSwitchHDRPool()
Gets the HDR Pool enabled/disabled value as boolean. Default is FALSE.
public boolean checkIsDirect()
checkIsDirect -- check if the protocol is DirectProtocol once per CPDS
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |