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
Methods inherited from interface java.util.Set |
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray |
DataSourceImpl.AbstractPool
public DataSourceImpl.AbstractPool(DataSourceImpl source)
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
Copyright 2001,2002 SolarMetric, Inc. All Rights Reserved.