|
Oracle Fusion Middleware Java API Reference for Oracle ADF Model 11g Release 1 (11.1.1.7.0) E10653-08 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectoracle.adf.model.connection.pool.ConnectionPool
public class ConnectionPool
ConnectionPool manages a pool of connections in a system.
When a client does a look up for a connection against the Connection Architecture The Factory that is resposible for creating the connection instances first checks the pool to see if the requested connection already exists. If yes the connection is recycled from the pool
In any case the client is always guarenteed to have a unique instance of the a connection. The instance could be a recycled instance from a pool or a new instance. This is opaque to the client
Constructor Summary | |
---|---|
ConnectionPool()
Create a ConnectionPool instance of a default size |
Method Summary | |
---|---|
java.lang.Object |
allocate(java.lang.Object poolKey)
Allocate a connection instance from this pool. |
protected void |
clearCache(java.lang.Object poolKey)
This is an expensive operation and should be called ONLY when the connection instance is removed from the Context. |
void |
put(java.lang.Object poolKey,
java.lang.Object connection,
boolean used)
Put an Object into the Pool for the first time so that it can be allocated and recycled for subsequent client requests. |
void |
release(java.lang.Object connection)
Release a connection back to the pool |
protected void |
removeBinding(java.lang.Object poolKey,
java.lang.Object connection)
Removes an object from pool, instead of freeing it. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ConnectionPool()
Method Detail |
---|
public void put(java.lang.Object poolKey, java.lang.Object connection, boolean used) throws java.lang.Exception
poolKey
- The Key associated with the connection instanceconnection
- The Connection instance to be added to the pool.
Exception
- If the connection could be added to
the pool.
java.lang.Exception
public java.lang.Object allocate(java.lang.Object poolKey) throws java.lang.Exception
poolKey
- The Key associated with the connection to be allocated.
java.lang.Exception
public void release(java.lang.Object connection) throws java.lang.Exception
connection
- The connection instance to be released back to the pool.
java.lang.Exception
protected void removeBinding(java.lang.Object poolKey, java.lang.Object connection)
poolKey
- the key with which connection was added to poolprotected void clearCache(java.lang.Object poolKey)
|
Oracle Fusion Middleware Java API Reference for Oracle ADF Model 11g Release 1 (11.1.1.7.0) E10653-08 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |