org.firebirdsql.pool
Interface FirebirdPool
- All Known Implementing Classes:
- FBConnectionPoolDataSource, FBWrappingDataSource
- public interface FirebirdPool
Configuration for the org.firebirdsql.jdbc.FBWrappingDataSource
and
FBConnectionPoolDataSource
objects.
Following properties are supported:
blobBufferSize
size of the buffer used to transfer BLOB data.
blockingTimeout
time in milliseconds during which #getConnection()
method will
block if no free connection is in pool.
charSet
similar to encoding
, but takes Java character set name
instead of Firebird's encoding.
database
path to a database including the server name; for example
localhost/3050:c:/path/to/database.gdb
.
encoding
character encoding for the JDBC connection.
freeSize
read-only: gives amount of free connections in the pool, when 0, blocking
will occur if workingSize
is equal to maxPoolSize
.
isolation
default transaction isolation level for connections as string; possible
values are:
- TRANSACTION_READ_COMMITTED
- TRANSACTION_REPEATABLE_READ
- TRANSACTION_SERIALIZABLE
loginTimeout
property from DataSource
, in this context is a synonym
for blockingTimeout
(however value is specified in seconds).
maxIdleTime
time in milliseconds after which idle physical connection in the
pool is closed.
maxStatements
maximum number of pooled prepared statements, if 0, pooling is switched
off.
maxPoolSize
maximum number of physical connections that can be opened by this data
source.
minPoolSize
minimum number of connections that will remain open by this data source.
nonStandardProperty
a non-standard connection parameter in form name[=value]
.
password
password that is used to connect to database.
pingInterval
time interval during which connection will be proved for aliveness.
pooling
allows switching pooling off.
statementPooling
alternative way to switch statement pooling off.
socketBufferSize
size of the socket buffer in bytes. In some cases values used by JVM by
default are not optimal. This results in performance degradation
(especially when you transfer big BLOBs). Usually 8192 bytes provides
good results.
roleName
SQL role name.
tpbMapping
mapping of the TPB parameters to JDBC transaction isolation levels.
transactionIsolationLevel
default transaction isolation level, number from Connection
interface.
totalSize
total number of allocated connections.
type
type of connection that will be created. There are four possible types:
pure Java (or type 4), type 2 that will use Firebird client library to
connect to the database, local-mode type 2 driver, and embedded that
will use embedded engine (access to local databases). Possible values
are (case insensitive):
"PURE_JAVA"
or "TYPE4"
for pure Java (type 4) JDBC connections;
"NATIVE"
or "TYPE2"
to use Firebird client library;
"LOCAL"
to use Firebird client library in local-mode (IPC link to server);
"EMBEDDED"
to use embedded engine.
userName
name of the user that will be used to access the database.
workingSize
number of connections that are in use (e.g. were obtained using
#getConnection()
method, but not yet closed).
- Author:
- Roman Rokytskyy
shutdown
public void shutdown()
getBlockingTimeout
public int getBlockingTimeout()
setBlockingTimeout
public void setBlockingTimeout(int blockingTimeoutValue)
getDatabase
public java.lang.String getDatabase()
setDatabase
public void setDatabase(java.lang.String databaseValue)
getEncoding
public java.lang.String getEncoding()
setEncoding
public void setEncoding(java.lang.String encodingValue)
getCharSet
public java.lang.String getCharSet()
setCharSet
public void setCharSet(java.lang.String charSet)
throws java.sql.SQLException
- Throws:
java.sql.SQLException
getMaxIdleTime
public int getMaxIdleTime()
setMaxIdleTime
public void setMaxIdleTime(int maxIdleTime)
getMaxStatements
public int getMaxStatements()
setMaxStatements
public void setMaxStatements(int maxStatements)
getMaxPoolSize
public int getMaxPoolSize()
setMaxPoolSize
public void setMaxPoolSize(int maxPoolSize)
getMinPoolSize
public int getMinPoolSize()
setMinPoolSize
public void setMinPoolSize(int minPoolSize)
getPassword
public java.lang.String getPassword()
setPassword
public void setPassword(java.lang.String passwordValue)
getTpbMapping
public java.lang.String getTpbMapping()
setTpbMapping
public void setTpbMapping(java.lang.String tpbMappingValue)
getUserName
public java.lang.String getUserName()
setUserName
public void setUserName(java.lang.String userNameValue)
getBlobBufferSize
public int getBlobBufferSize()
setBlobBufferSize
public void setBlobBufferSize(int blobBufferSizeValue)
getType
public java.lang.String getType()
setType
public void setType(java.lang.String typeValue)
throws java.sql.SQLException
- Throws:
java.sql.SQLException
getPingInterval
public int getPingInterval()
setPingInterval
public void setPingInterval(int pingIntervalValue)
getSocketBufferSize
public int getSocketBufferSize()
setSocketBufferSize
public void setSocketBufferSize(int socketBufferSize)
getRoleName
public java.lang.String getRoleName()
setRoleName
public void setRoleName(java.lang.String roleName)
getNonStandardProperty
public java.lang.String getNonStandardProperty(java.lang.String key)
setNonStandardProperty
public void setNonStandardProperty(java.lang.String key,
java.lang.String value)
setNonStandardProperty
public void setNonStandardProperty(java.lang.String propertyMapping)
isPooling
public boolean isPooling()
setPooling
public void setPooling(boolean pooling)
isStatementPooling
public boolean isStatementPooling()
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
getTransactionIsolationLevel
public int getTransactionIsolationLevel()
setTransactionIsolationLevel
public void setTransactionIsolationLevel(int level)
getIsolation
public java.lang.String getIsolation()
setIsolation
public void setIsolation(java.lang.String isolation)
throws java.sql.SQLException
- Throws:
java.sql.SQLException
Copyright © 2001 David Jencks and other authors. All rights reserved.