com.waveset.util
Class KiddiePool

java.lang.Object
  extended bycom.waveset.util.ConnectionPool
      extended bycom.waveset.util.KiddiePool

public class KiddiePool
extends ConnectionPool

A private, homogeneous JDBC connection pool.


Nested Class Summary
 
Nested classes inherited from class com.waveset.util.ConnectionPool
ConnectionPool.Bucket
 
Field Summary
static java.lang.String code_id
           
 
Fields inherited from class com.waveset.util.ConnectionPool
_disabled
 
Constructor Summary
KiddiePool()
          Create a private, homogeneous connection pool
 
Method Summary
protected  void addPooledConnection(PooledConnection con)
          Add a connection back to the pool.
protected  void dumpConnections(java.lang.StringBuffer sb)
          It only makes sense to dump the free connections per pool if there are multiple pools in the bucket.
 void flush()
          Close all connections in the pool.
 PooledConnection getConnection()
          Obtain a connection from the only bucket this "kiddie" pool has.
 int getFreeConnectionCount()
           
 PooledConnection getPooledConnection()
          Get a pooled connection if available.
 
Methods inherited from class com.waveset.util.ConnectionPool
destroy, dump, dump, dumpGlobal, dumpGlobal, dumpPrivate, flushConnections, flushPrivate, getConnection, getConnection, getConnection, getConnection, getConnectionPool, getVersion, incCreateStats, incDestroyStats, println, registerDriver, registerDriver
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

code_id

public static final java.lang.String code_id
See Also:
Constant Field Values
Constructor Detail

KiddiePool

public KiddiePool()
Create a private, homogeneous connection pool

Method Detail

getPooledConnection

public PooledConnection getPooledConnection()
Get a pooled connection if available. This is synchronized so keep it short.


addPooledConnection

protected void addPooledConnection(PooledConnection con)
Add a connection back to the pool. This is synchronized so keep it short.

Overrides:
addPooledConnection in class ConnectionPool

getConnection

public PooledConnection getConnection()
Obtain a connection from the only bucket this "kiddie" pool has.


flush

public void flush()
Close all connections in the pool.

Overrides:
flush in class ConnectionPool

getFreeConnectionCount

public int getFreeConnectionCount()
Overrides:
getFreeConnectionCount in class ConnectionPool
Returns:
number of free connections in the pool

NOTE: This method is declared public only to facilitate internal testing. This method is not part of the public API. Application code should not call this method.


dumpConnections

protected void dumpConnections(java.lang.StringBuffer sb)
It only makes sense to dump the free connections per pool if there are multiple pools in the bucket. KiddiePool only has one.

Overrides:
dumpConnections in class ConnectionPool
Parameters:
sb - string buffer to write messages to