org.firebirdsql.pool
Interface FirebirdPool

All Superinterfaces:
ConnectionPoolConfiguration, FirebirdConnectionProperties
All Known Implementing Classes:
AbstractFBConnectionPoolDataSource, FBWrappingDataSource

public interface FirebirdPool
extends FirebirdConnectionProperties, ConnectionPoolConfiguration

Configuration for the FBWrappingDataSource and org.firebirdsql.pool.FBConnectionPoolDataSource objects. Following properties are supported:

Author:
Roman Rokytskyy

Method Summary
 int getBlockingTimeout()
          Get time during which ConnectionPoolDataSource.getPooledConnection() can block.
 int getFreeSize()
           
 int getMaxIdleTime()
          Get time after which idle connections will be deallocated.
 int getMaxPoolSize()
          Get maximum number of physical connections that can be simultaneously open.
 int getMaxStatements()
           
 int getMinPoolSize()
          Get minimum number of open JDBC connections that will be created when pool is started.
 int getPingInterval()
          Get time interval after which connection should be pinged.
 int getTotalSize()
           
 int getWorkingSize()
           
 boolean isPooling()
          Check if this connection pool uses connection pooling, or just implements JDBC 2.0 SE interfaces.
 boolean isStatementPooling()
          Check if this connection pool provides also prepared statement pooling.
 void restart()
           
 void setBlockingTimeout(int blockingTimeoutValue)
           
 void setMaxIdleTime(int maxIdleTime)
           
 void setMaxPoolSize(int maxPoolSize)
           
 void setMaxStatements(int maxStatements)
           
 void setMinPoolSize(int minPoolSize)
           
 void setPingInterval(int pingIntervalValue)
           
 void setPooling(boolean pooling)
           
 void setStatementPooling(boolean statementPooling)
           
 void shutdown()
           
 
Methods inherited from interface org.firebirdsql.jdbc.FirebirdConnectionProperties
getBlobBufferSize, getBuffersNumber, getCharSet, getDatabase, getDatabaseParameterBuffer, getDefaultIsolation, getDefaultTransactionIsolation, getEncoding, getNonStandardProperty, getPassword, getRoleName, getSocketBufferSize, getSqlDialect, getTpbMapping, getTransactionParameters, getType, getUserName, getUseTranslation, isDefaultResultSetHoldable, isTimestampUsesLocalTimezone, isUseStandardUdf, isUseStreamBlobs, setBlobBufferSize, setBuffersNumber, setCharSet, setDatabase, setDefaultIsolation, setDefaultResultSetHoldable, setDefaultTransactionIsolation, setEncoding, setNonStandardProperty, setNonStandardProperty, setPassword, setRoleName, setSocketBufferSize, setSqlDialect, setTimestampUsesLocalTimezone, setTpbMapping, setTransactionParameters, setType, setUserName, setUseStandardUdf, setUseStreamBlobs, setUseTranslation
 
Methods inherited from interface org.firebirdsql.pool.ConnectionPoolConfiguration
getIdleTimeout, getMaxConnections, getMinConnections, getPingStatement, getRetryInterval, isPingable
 

Method Detail

restart

public void restart()

shutdown

public void shutdown()

getBlockingTimeout

public int getBlockingTimeout()
Description copied from interface: ConnectionPoolConfiguration
Get time during which ConnectionPoolDataSource.getPooledConnection() can block. By default method blocks forever.

Specified by:
getBlockingTimeout in interface ConnectionPoolConfiguration
Returns:
pool blocking timeout in milliseconds, Integer.MAX_VALUE indicates blocking forever.

setBlockingTimeout

public void setBlockingTimeout(int blockingTimeoutValue)

getMaxIdleTime

public int getMaxIdleTime()
Description copied from interface: ConnectionPoolConfiguration
Get time after which idle connections will be deallocated.

Specified by:
getMaxIdleTime in interface ConnectionPoolConfiguration
Returns:
idle timeout in milliseconds, Integer.MAX_VALUE indicates that idle connections are not removed.

setMaxIdleTime

public void setMaxIdleTime(int maxIdleTime)

getMaxStatements

public int getMaxStatements()

setMaxStatements

public void setMaxStatements(int maxStatements)

getMaxPoolSize

public int getMaxPoolSize()
Description copied from interface: ConnectionPoolConfiguration
Get maximum number of physical connections that can be simultaneously open.

Specified by:
getMaxPoolSize in interface ConnectionPoolConfiguration
Returns:
maximum number of simultaneously open physical database connections, 0 if no limit exists.

setMaxPoolSize

public void setMaxPoolSize(int maxPoolSize)

getMinPoolSize

public int getMinPoolSize()
Description copied from interface: ConnectionPoolConfiguration
Get minimum number of open JDBC connections that will be created when pool is started.

Specified by:
getMinPoolSize in interface ConnectionPoolConfiguration
Returns:
minimum number of open JDBC connections to open at startup.

setMinPoolSize

public void setMinPoolSize(int minPoolSize)

getPingInterval

public int getPingInterval()
Description copied from interface: ConnectionPoolConfiguration
Get time interval after which connection should be pinged.

Specified by:
getPingInterval in interface ConnectionPoolConfiguration
Returns:
number of milliseconds in the ping interval.

setPingInterval

public void setPingInterval(int pingIntervalValue)

isPooling

public boolean isPooling()
Description copied from interface: ConnectionPoolConfiguration
Check if this connection pool uses connection pooling, or just implements JDBC 2.0 SE interfaces. By default pooling is on. It might make sense to set pooling off to check performance degradation in test environment. It could be also used in the environment where physical connection must be closed right after usage, however using JDBC 2.0 SE interfaces is either a requirement or is simpler than standard java.sql.Driver.

Specified by:
isPooling in interface ConnectionPoolConfiguration
Returns:
true if pooling is enabled.

setPooling

public void setPooling(boolean pooling)

isStatementPooling

public boolean isStatementPooling()
Description copied from interface: ConnectionPoolConfiguration
Check if this connection pool provides also prepared statement pooling. By default prepared statement pooling is enabled, however there might be situations where statement pooling is not desired, for example in environments where database can quickly run out of handles and fast handle reuse is required.

Specified by:
isStatementPooling in interface ConnectionPoolConfiguration
Returns:
true if prepared statement pooling is enabled.

setStatementPooling

public void setStatementPooling(boolean statementPooling)

getFreeSize

public int getFreeSize()
                throws java.sql.SQLException
Throws:
java.sql.SQLException

getWorkingSize

public int getWorkingSize()
                   throws java.sql.SQLException
Throws:
java.sql.SQLException

getTotalSize

public int getTotalSize()
                 throws java.sql.SQLException
Throws:
java.sql.SQLException


Copyright © 2001 David Jencks and other authors. All rights reserved.