SolarMetric Kodo JDO 2.4.3 generated on March 27 2003

com.solarmetric.datasource
Class DataSourceImpl.AbstractPool

java.lang.Object
  |
  +--java.util.AbstractCollection
        |
        +--java.util.AbstractSet
              |
              +--java.util.HashSet
                    |
                    +--com.solarmetric.datasource.DataSourceImpl.AbstractPool
All Implemented Interfaces:
Cloneable, Collection, DataSourceImpl.Pool, Serializable, Set
Direct Known Subclasses:
DataSourceImpl.SortablePool
Enclosing class:
DataSourceImpl

public abstract class DataSourceImpl.AbstractPool
extends HashSet
implements DataSourceImpl.Pool

See Also:
Serialized Form

Constructor Summary
DataSourceImpl.AbstractPool(DataSourceImpl source)
           
 
Method Summary
 void clean()
          removes dead connections from the pool.
 void close(com.solarmetric.datasource.PoolConnection conn, boolean remove)
          Close a pooled connection.
 void closeAll()
          Close all pooled connections.
 Connection getConnection(JDBCConnectionRequestInfo cri)
          Obtain a connection from the pool.
 int getMaxPool()
           
 int getMinPool()
           
 int getTotalSize()
          Returns the size of the connection pool + the size of the taken connections.
 void setMaxPool(int max)
          Set the maximum size of the pool.
 void setMinPool(int min)
           
 String toString()
           
 StringBuffer toString(StringBuffer buffer)
           
 
Methods inherited from class java.util.HashSet
add, clear, clone, contains, isEmpty, iterator, remove, size
 
Methods inherited from class java.util.AbstractSet
equals, hashCode, removeAll
 
Methods inherited from class java.util.AbstractCollection
addAll, containsAll, retainAll, toArray, toArray
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.solarmetric.datasource.DataSourceImpl.Pool
chooseConnection
 
Methods inherited from interface java.util.Set
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
 

Constructor Detail

DataSourceImpl.AbstractPool

public DataSourceImpl.AbstractPool(DataSourceImpl source)
Method Detail

toString

public String toString()
Overrides:
toString in class AbstractCollection

toString

public StringBuffer toString(StringBuffer buffer)

getTotalSize

public int getTotalSize()
Returns the size of the connection pool + the size of the taken connections.

closeAll

public void closeAll()
Description copied from interface: DataSourceImpl.Pool
Close all pooled connections.
Specified by:
closeAll in interface DataSourceImpl.Pool

getConnection

public Connection getConnection(JDBCConnectionRequestInfo cri)
                         throws SQLException
Description copied from interface: DataSourceImpl.Pool
Obtain a connection from the pool.
Specified by:
getConnection in interface DataSourceImpl.Pool
Following copied from interface: com.solarmetric.datasource.DataSourceImpl.Pool
Parameters:
cri - the request information.
Returns:
a pooled or new Connection.

setMaxPool

public void setMaxPool(int max)
Description copied from interface: DataSourceImpl.Pool
Set the maximum size of the pool.
Specified by:
setMaxPool in interface DataSourceImpl.Pool
Following copied from interface: com.solarmetric.datasource.DataSourceImpl.Pool
Parameters:
max - the maximum size

getMaxPool

public int getMaxPool()
Specified by:
getMaxPool in interface DataSourceImpl.Pool
Following copied from interface: com.solarmetric.datasource.DataSourceImpl.Pool
Returns:
the maximum size of the pool.

setMinPool

public void setMinPool(int min)
Specified by:
setMinPool in interface DataSourceImpl.Pool
Following copied from interface: com.solarmetric.datasource.DataSourceImpl.Pool
Parameters:
min - the minimum size of the pool.

getMinPool

public int getMinPool()
Specified by:
getMinPool in interface DataSourceImpl.Pool
Following copied from interface: com.solarmetric.datasource.DataSourceImpl.Pool
Returns:
the minimum size of the pool.

close

public void close(com.solarmetric.datasource.PoolConnection conn,
                  boolean remove)
           throws SQLException
Description copied from interface: DataSourceImpl.Pool
Close a pooled connection.
Specified by:
close in interface DataSourceImpl.Pool
Following copied from interface: com.solarmetric.datasource.DataSourceImpl.Pool
Parameters:
conn - the connection to close.
remove - if true, remove the connection from the pool.

clean

public void clean()
           throws SQLException
removes dead connections from the pool.
Specified by:
clean in interface DataSourceImpl.Pool

SolarMetric Kodo JDO 2.4.3 generated on March 27 2003

Copyright 2001,2002 SolarMetric, Inc. All Rights Reserved.