|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--oracle.jdbc.pool.OracleDataSource | +--oracle.jdbc.pool.OracleConnectionCacheImpl
Field Summary | |
static int |
DYNAMIC_SCHEME
|
static int |
FIXED_RETURN_NULL_SCHEME
|
static int |
FIXED_WAIT_SCHEME
|
Constructor Summary | |
OracleConnectionCacheImpl()
Default Constructor. |
|
OracleConnectionCacheImpl(javax.sql.ConnectionPoolDataSource ds)
Create an OracleConnectionCacheImpl with the given ConnectionPoolDataSource from which PooledConnections have to created. |
Method Summary | |
void |
close()
Physically close all the pooled connections in the cache and free all the resources. |
void |
closePooledConnection(javax.sql.PooledConnection pc)
Invoked by the ConnectionEventListener when an error occurs on a PooledConnection/LogicalConnection signaling that it is no longer good to be used and can be closed. |
int |
getActiveSize()
Return the total no of connections that are being used. |
int |
getCacheScheme()
Return the Caching Scheme being used. |
int |
getCacheSize()
Return the total no of connections in the Cache. |
java.sql.Connection |
getConnection()
Attempt to get a logical connection from the Cache. |
java.sql.Connection |
getConnection(java.lang.String user,
java.lang.String passwd)
Attempt to get a logical connection from the Cache. |
int |
getMaxLimit()
Return the Max limit on Connections. |
int |
getMinLimit()
Return the minimum limit on the no of Connections. |
javax.naming.Reference |
getReference()
|
int |
getStmtCacheSize()
Return the size of Statement Cache. |
void |
reusePooledConnection(javax.sql.PooledConnection pc)
Invoked by the ConnectionEventListener instance when Logical connection handles are closed signaling that the PooledConnection can be recycled into the pool for further use. |
void |
setCacheScheme(int s)
Set the Scheme for this Cache. |
void |
setConnectionPoolDataSource(javax.sql.ConnectionPoolDataSource ds)
Associate a ConnectionPoolDataSource datasource to the Cache. |
void |
setMaxLimit(int l)
Set the maximum no of connections for the Cache. |
void |
setMinLimit(int l)
Set the minimum no of connections for the Cache. |
void |
setStmtCacheSize(int size)
Set the statement cache size. |
void |
setStmtCacheSize(int size,
boolean clearMetaData)
Set the statement cache size. |
Methods inherited from class oracle.jdbc.pool.OracleDataSource |
getDatabaseName,
getDataSourceName,
getDescription,
getDriverType,
getLoginTimeout,
getLogWriter,
getNetworkProtocol,
getPortNumber,
getServerName,
getTNSEntryName,
getURL,
getUser,
setDatabaseName,
setDataSourceName,
setDescription,
setDriverType,
setLoginTimeout,
setLogWriter,
setNetworkProtocol,
setPassword,
setPortNumber,
setServerName,
setTNSEntryName,
setURL,
setUser |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static final int DYNAMIC_SCHEME
public static final int FIXED_WAIT_SCHEME
public static final int FIXED_RETURN_NULL_SCHEME
Constructor Detail |
public OracleConnectionCacheImpl() throws java.sql.SQLException
Default Constructor. Should have an explicit call to set the URL, User, Password and other DataSource details. A ConnectionPoolDataSource is created with these options from which PooledConnections can be created.
public OracleConnectionCacheImpl(javax.sql.ConnectionPoolDataSource ds) throws java.sql.SQLException
Create an OracleConnectionCacheImpl with the given ConnectionPoolDataSource from which PooledConnections have to created. In which case, url, user name, password, and other DataSource properties set on this Cache are ignored.
ds
- a datasource from which the Cache can create
PooledConnections.Method Detail |
public void setConnectionPoolDataSource(javax.sql.ConnectionPoolDataSource ds) throws java.sql.SQLException
ds
- a datasource from which the Cache can create
PooledConnections.public java.sql.Connection getConnection() throws java.sql.SQLException
public java.sql.Connection getConnection(java.lang.String user, java.lang.String passwd) throws java.sql.SQLException
public void reusePooledConnection(javax.sql.PooledConnection pc) throws java.sql.SQLException
Invoked by the ConnectionEventListener instance when Logical connection handles are closed signaling that the PooledConnection can be recycled into the pool for further use.
pc
- The pooled connection object that needs to be recylced.public void closePooledConnection(javax.sql.PooledConnection pc) throws java.sql.SQLException
Invoked by the ConnectionEventListener when an error occurs on a PooledConnection/LogicalConnection signaling that it is no longer good to be used and can be closed.
pc
- The pooled connection object that has to be closed
because of an error.public void close() throws java.sql.SQLException
Physically close all the pooled connections in the cache and free all the resources.
public void setMinLimit(int l) throws java.sql.SQLException
l
- Minimum no. of Connections.public int getMinLimit()
public void setMaxLimit(int l) throws java.sql.SQLException
l
- maximum no. of Connections.public int getMaxLimit()
public int getCacheScheme()
public void setCacheScheme(int s) throws java.sql.SQLException
int
- Caching Schemepublic int getActiveSize()
public int getCacheSize()
public javax.naming.Reference getReference() throws javax.naming.NamingException
public void setStmtCacheSize(int size) throws java.sql.SQLException
If more than
size
- Size of the Cache
public void setStmtCacheSize(int size, boolean clearMetaData) throws java.sql.SQLException
If more than
size
- Size of the CacheclearMetaData
- Whether the state has to be cleared or not
public int getStmtCacheSize()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |