@Deprecated public abstract class AbstractConnectionPool extends RootCommonDataSource implements PooledObjectListener
getConnectionManager()
and few utility methods (getLogger()
and getPoolName()
).Modifier and Type | Class and Description |
---|---|
protected static class |
AbstractConnectionPool.UserPasswordPair
Deprecated.
Structure class to store user name and password.
|
Modifier | Constructor and Description |
---|---|
protected |
AbstractConnectionPool()
Deprecated.
Create instance of this class.
|
Modifier and Type | Method and Description |
---|---|
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.
|
getLogWriter, getParentLogger, setLogWriter
protected AbstractConnectionPool()
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
Copyright © 2001-2019 Jaybird (Firebird JDBC/JCA) team. All rights reserved.