|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.waveset.adapter.ResourceConnectionPool
Field Summary | |
protected int |
_connectionsInUse
|
protected boolean |
_shutdown
|
protected static Trace |
_trace
|
static java.lang.String |
code_id
|
static long |
IDLE_TIME_DEFAULT
|
static int |
MAX_CONNECTIONS_DEFAULT
|
static java.lang.String |
RA_CONNECTIONS_IDLETIME
|
static java.lang.String |
RA_CONNECTIONS_MAX
|
Constructor Summary | |
ResourceConnectionPool()
|
|
ResourceConnectionPool(Resource resource)
|
Method Summary | |
static void |
addStaleConnections(long idleTime,
java.util.Iterator idle,
java.util.List stale)
|
ResourceConnection |
getConnection(java.util.HashMap args,
java.lang.String type,
boolean pooled)
|
ResourceConnection |
getConnection(java.util.HashMap args,
java.lang.String type,
long timeout,
boolean pooled)
Returns a connection. |
long |
getIdleTime()
|
protected ResourceConnection |
getPooledConnection(java.util.HashMap args,
java.lang.String type)
Returns a pooled connection. |
protected ResourceConnection |
getPooledConnection(java.util.HashMap args,
java.lang.String type,
java.util.ArrayList idle)
Assumes caller has synchronized this. |
Resource |
getResource()
|
protected java.lang.String |
getResourceAttributeValue(java.lang.String name)
|
boolean |
isEmpty()
If the pool has no connections pooled and none in use then it is considered to be empty. |
boolean |
isNoneInUse()
|
protected ResourceConnection |
newConnection(java.util.HashMap args,
java.lang.String type,
boolean pooled)
Creates a new connection object of the specified type. |
java.util.ArrayList |
reapConnections()
Removes from the pool those connections which have been idle longer than the specified timeout. |
void |
releaseConnection(ResourceConnection connection,
boolean force)
Releases the specified connection. |
protected void |
releaseConnection(ResourceConnection connection,
boolean force,
java.util.List idle)
Assumes caller has synchronized on this |
void |
setResource(Resource resource)
|
void |
shutdown()
Begins shutdown of the pool by disconnecting all idle connections. |
static void |
shutdown(java.util.List idle)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String code_id
protected static Trace _trace
public static final java.lang.String RA_CONNECTIONS_IDLETIME
public static final java.lang.String RA_CONNECTIONS_MAX
public static final long IDLE_TIME_DEFAULT
public static final int MAX_CONNECTIONS_DEFAULT
protected int _connectionsInUse
protected boolean _shutdown
Constructor Detail |
public ResourceConnectionPool() throws WavesetException
public ResourceConnectionPool(Resource resource) throws WavesetException
Method Detail |
public void setResource(Resource resource) throws WavesetException
WavesetException
public Resource getResource()
protected java.lang.String getResourceAttributeValue(java.lang.String name)
public boolean isNoneInUse()
public boolean isEmpty()
protected ResourceConnection newConnection(java.util.HashMap args, java.lang.String type, boolean pooled) throws java.lang.IllegalArgumentException, WavesetException
java.lang.IllegalArgumentException
WavesetException
protected ResourceConnection getPooledConnection(java.util.HashMap args, java.lang.String type) throws WavesetException
WavesetException
protected ResourceConnection getPooledConnection(java.util.HashMap args, java.lang.String type, java.util.ArrayList idle) throws WavesetException
args
- type
- idle
-
WavesetException
public ResourceConnection getConnection(java.util.HashMap args, java.lang.String type, long timeout, boolean pooled) throws WavesetException
WavesetException
public ResourceConnection getConnection(java.util.HashMap args, java.lang.String type, boolean pooled) throws WavesetException
WavesetException
public void releaseConnection(ResourceConnection connection, boolean force) throws WavesetException
WavesetException
protected void releaseConnection(ResourceConnection connection, boolean force, java.util.List idle) throws WavesetException
connection
- force
- idle
-
WavesetException
public long getIdleTime()
public java.util.ArrayList reapConnections()
public static void addStaleConnections(long idleTime, java.util.Iterator idle, java.util.List stale)
public void shutdown()
public static void shutdown(java.util.List idle)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |