com.softwareag.tamino.db.api.connection
Interface TConnectionPool

All Known Implementing Classes:
TConnectionPoolImpl

public interface TConnectionPool

TConnectionPool represents a pool of openned connections. The pool provides services to get and put back openned connections. When instantiated a connection pool initially holds a fixed but client specified number of openned connections for a specific database URI, user and password. Once the amount of checked out connections reaches this size new connections are automatically instantiated and put to the pool to a user given size of maximum connections. Each connection pool gets a logical name that can be used by a connection pool manager that basically manages a set of connection pools.

Version:
$Revision: 1.6 $
Author:
Marcus Schreyer

Method Summary
 void deleteConnection(TPooledConnection p0)
          Method deleteConnection
 TConnection getConnection()
          Gets a openned connection from the pool.
 TConnectionPoolDescriptor getDescriptor()
          Gets the TCOnnectionPoolDescriptor
 java.util.Locale getLocale()
          Gets Locale
 java.lang.String getName()
          Gets the connection pools logical name.
 TConnectionPoolStatistics getStatistics()
          Method getStatistics
 void release()
          Releases all openned connections given within the pool.
 void retainConnection(TConnection connection)
          Retains the handed connection back to the pool.
 void setLocale(java.util.Locale locale)
          Sets Locale
 

Method Detail

getStatistics

TConnectionPoolStatistics getStatistics()
Method getStatistics

Returns:
a TConnectionPoolStatistics

deleteConnection

void deleteConnection(TPooledConnection p0)
Method deleteConnection

Parameters:
p0 - a TConnectionWrapper

getConnection

TConnection getConnection()
                          throws TConnectionNotAvailableException
Gets a openned connection from the pool. If none are available due to the reached number of maximum connections an exception is thrown.

Returns:
an openned TConnectionn instance.
Throws:
TConnectionNotAvailableException

retainConnection

void retainConnection(TConnection connection)
Retains the handed connection back to the pool. Generally this operation is called implicitly when connection.close is invoked on an openned connection obtained previously from this connection pool.

Parameters:
connection - is the TConnection that should be put pack into the pool.

release

void release()
Releases all openned connections given within the pool.


getName

java.lang.String getName()
Gets the connection pools logical name.

Returns:
the logical pool name.

getDescriptor

TConnectionPoolDescriptor getDescriptor()
Gets the TCOnnectionPoolDescriptor

Returns:
the TConnectioPoolDescriptor

setLocale

void setLocale(java.util.Locale locale)
Sets Locale


getLocale

java.util.Locale getLocale()
Gets Locale

Returns:
Locale.


Copyright (c) 2013 Software AG. All Rights Reserved.