|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.firebirdsql.ds.RootCommonDataSource
org.firebirdsql.pool.AbstractConnectionPool
@Deprecated public abstract class AbstractConnectionPool
Abstract class for creating connection pools. Subclasses must implement
factory method to produce physical connections to the database (method
getConnectionManager()
and few utility methods (getLogger()
and getPoolName()
).
Nested Class Summary | |
---|---|
protected static class |
AbstractConnectionPool.UserPasswordPair
Deprecated. Structure class to store user name and password. |
Constructor Summary | |
---|---|
protected |
AbstractConnectionPool()
Deprecated. Create instance of this class. |
Method Summary | |
---|---|
protected void |
finalize()
Deprecated. Shutdown pool if object is garbage collected. |
abstract ConnectionPoolConfiguration |
getConfiguration()
Deprecated. Get configuration of this data source. |
protected abstract PooledConnectionManager |
getConnectionManager()
Deprecated. Get instance of PooledConnectionManager responsible for
instantiating pooled connections. |
abstract int |
getFreeSize()
Deprecated. Get number of free connections in this pool. |
protected abstract org.firebirdsql.logging.Logger |
getLogger()
Deprecated. Get logger for this instance. |
protected PooledObject |
getPooledConnection(org.firebirdsql.pool.PooledConnectionQueue queue)
Deprecated. Get pooled connection. |
protected abstract java.lang.String |
getPoolName()
Deprecated. Get name of the pool. |
org.firebirdsql.pool.PooledConnectionQueue |
getQueue(java.lang.Object key)
Deprecated. Get queue for the specified user name and password. |
abstract int |
getTotalSize()
Deprecated. Get total size of physical connections opened to the database. |
abstract int |
getWorkingSize()
Deprecated. Get number of connections that are in use. |
protected void |
physicalConnectionDeallocated(PooledObjectEvent event)
Deprecated. Notify about the deallocation of the physical connection (for example, when connection is removed by the idle remover thread). |
void |
pooledObjectReleased(PooledObjectEvent event)
Deprecated. Notify about new available connection. |
void |
restart()
Deprecated. Restart this JDBC pool. |
void |
shutdown()
Deprecated. Shutdown this JDBC pool. |
Methods inherited from class org.firebirdsql.ds.RootCommonDataSource |
---|
getLogWriter, getParentLogger, setLogWriter |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.sql.CommonDataSource |
---|
getLoginTimeout, setLoginTimeout |
Constructor Detail |
---|
protected AbstractConnectionPool()
Method Detail |
---|
protected abstract org.firebirdsql.logging.Logger getLogger()
Logger
.protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
- if something bad happened.public void restart()
public void shutdown()
public org.firebirdsql.pool.PooledConnectionQueue getQueue(java.lang.Object key) throws java.sql.SQLException
key
- key identifying pool.
PooledConnectionQueue
.
java.sql.SQLException
- if something went wrong.protected PooledObject getPooledConnection(org.firebirdsql.pool.PooledConnectionQueue queue) throws java.sql.SQLException
queue
- instance of PooledConnectionQueue
where connection
will be obtained.
PooledObject
.
java.sql.SQLException
- if pooled connection cannot be obtained.public void pooledObjectReleased(PooledObjectEvent event)
PooledConnection
when its wrapped connection being closed.
pooledObjectReleased
in interface PooledObjectListener
event
- instance of PooledObjectEvent
containing
information about closed connection.protected void physicalConnectionDeallocated(PooledObjectEvent event)
event
- instance of PooledObjectEvent
.public abstract ConnectionPoolConfiguration getConfiguration()
ConnectionPoolConfiguration
describing
this data source.protected abstract PooledConnectionManager getConnectionManager() throws java.sql.SQLException
PooledConnectionManager
responsible for
instantiating pooled connections.
PooledConnectionManager
java.sql.SQLException
- if connection manager cannot be obtained.protected abstract java.lang.String getPoolName()
public abstract int getFreeSize() throws java.sql.SQLException
getMaxSize() != 0 && getMaxSize() == getWorkingSize()
,
meaning that we have allocated maximum number of connections and all
of them are in use.
java.sql.SQLException
public abstract int getTotalSize() throws java.sql.SQLException
java.sql.SQLException
public abstract int getWorkingSize() throws java.sql.SQLException
java.sql.SQLException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |