java.util.EventListener, javax.sql.CommonDataSource, javax.sql.ConnectionEventListener, javax.sql.ConnectionPoolDataSourceVirtuosoXADataSourcepublic class VirtuosoConnectionPoolDataSource extends VirtuosoDataSource implements javax.sql.ConnectionPoolDataSource, javax.sql.ConnectionEventListener
| Modifier and Type | Field | Description |
|---|---|---|
int |
initialPoolSize |
|
int |
maxIdleTime |
|
int |
maxPoolSize |
|
int |
maxStatements |
|
int |
minPoolSize |
|
protected static java.lang.String |
n_initialPoolSize |
|
protected static java.lang.String |
n_maxIdleTime |
|
protected static java.lang.String |
n_maxPoolSize |
|
protected static java.lang.String |
n_maxStatements |
|
protected static java.lang.String |
n_minPoolSize |
|
protected static java.lang.String |
n_propertyCycle |
|
int |
propertyCycle |
certificate, charSet, databaseName, dataSourceName, delegate, description, fbs, keystorepass, keystorepath, log_enable, logFileName, loginTimeout, logWriter, password, portNumber, provider, pstmtpoolsize, pwdclear, recvbs, roundrobin, sendbs, serverName, ssl, truststorepass, truststorepath, usepstmtpool, user| Constructor | Description |
|---|---|
VirtuosoConnectionPoolDataSource() |
| Modifier and Type | Method | Description |
|---|---|---|
protected void |
addProperties(javax.naming.Reference ref) |
|
protected void |
checkPool() |
|
protected void |
checkPropQueue() |
|
void |
close() |
Physically close all the pooled connections in the cache and free all
the resources
|
void |
connectionClosed(javax.sql.ConnectionEvent event) |
Invoked when the application calls close() on its representation of
the connection.
|
void |
connectionErrorOccurred(javax.sql.ConnectionEvent event) |
Invoked when a fatal connection error occurs, just before an SQLException
is thrown to the application.
|
void |
fill() |
Fills the cache with PooledConnections for later use.
|
VirtuosoPoolStatistic |
get_statistics() |
Return the cache statistics for the VirtuosoConnectionPoolDataSource
|
VirtuosoPoolStatistic[] |
getAll_statistics() |
Return an array of the cache statistics for the all created VirtuosoConnectionPoolDataSources
|
java.sql.Connection |
getConnection() |
Attempt to get a database connection from the pool or
to establish a database connection .
|
java.sql.Connection |
getConnection(java.lang.String user,
java.lang.String password) |
Attempt to get a database connection from the pool or
to establish a database connection .
|
int |
getInitialPoolSize() |
Get the number of physical connections the pool
will contain when it is created
|
int |
getMaxIdleTime() |
Get the number of seconds that a physical connection
will remain unused in the pool before the
connection is closed.
|
int |
getMaxPoolSize() |
Get the maximum number of physical connections
the pool will be able contain.
|
int |
getMaxStatements() |
Get the total number of statements that the pool will
keep open.
|
int |
getMinPoolSize() |
Get the minimum number of physical connections
the pool will keep available at all times.
|
javax.sql.PooledConnection |
getPooledConnection() |
Attempt to establish a database connection.
|
javax.sql.PooledConnection |
getPooledConnection(java.lang.String _user,
java.lang.String _password) |
Attempts to establish a physical database connection that can
be used as a pooled connection.
|
int |
getPropertyCycle() |
Get the interval, in seconds, that the pool will wait
before enforcing the current policy defined by the
values of the above connection pool properties
|
javax.naming.Reference |
getReference() |
|
void |
setInitialPoolSize(int parm) |
Set the number of physical connections the pool
should contain when it is created
|
void |
setMaxIdleTime(int parm) |
Set the number of seconds that a physical connection
should remain unused in the pool before the
connection is closed.
|
void |
setMaxPoolSize(int parm) |
Set the maximum number of physical conections that the pool should contain.
|
void |
setMaxStatements(int parm) |
Set the total number of statements that the pool should
keep open.
|
void |
setMinPoolSize(int parm) |
Set the number of physical connections the pool should keep available
at all times.
|
void |
setPropertyCycle(int parm) |
Set the interval, in seconds, that the pool should wait
before enforcing the current policy defined by the
values of the above connection pool properties
|
createShardingKeyBuilder, getParentLoggercreatePooledConnectionBuilder, getLoginTimeout, getLogWriter, setLoginTimeout, setLogWriterclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreate_url, create_url_key, createConnProperties, getCertificate, getCharset, getDatabaseName, getDataSourceName, getDelgate, getDescription, getFbs, getKeystorepass, getKeystorepath, getLog_Enable, getLogFileName, getLoginTimeout, getLogWriter, getParentLogger, getPassword, getPortNumber, getProvider, getPstmtpoolsize, getPwdClear, getRecvbs, getRoundrobin, getSendbs, getServerName, getSsl, getTruststorepass, getTruststorepath, getUsepstmtpool, getUser, isWrapperFor, setCertificate, setCharset, setDatabaseName, setDataSourceName, setDelegate, setDescription, setFbs, setKeystorepass, setKeystorepath, setLog_Enable, setLogFileName, setLoginTimeout, setLogWriter, setPassword, setPortNumber, setProvider, setPstmtpoolsize, setPwdClear, setRecvbs, setRoundrobin, setSendbs, setServerName, setSsl, setTruststorepass, setTruststorepath, setUsepstmtpool, setUser, unwrapprotected static final java.lang.String n_initialPoolSize
protected static final java.lang.String n_minPoolSize
protected static final java.lang.String n_maxPoolSize
protected static final java.lang.String n_maxIdleTime
protected static final java.lang.String n_propertyCycle
protected static final java.lang.String n_maxStatements
public int initialPoolSize
public volatile int minPoolSize
public volatile int maxPoolSize
public volatile int maxIdleTime
public volatile int propertyCycle
public volatile int maxStatements
protected void checkPool()
protected void checkPropQueue()
public VirtuosoPoolStatistic get_statistics()
public VirtuosoPoolStatistic[] getAll_statistics()
public void close()
throws java.sql.SQLException
java.sql.SQLException - if a database-access error occurspublic void connectionClosed(javax.sql.ConnectionEvent event)
connectionClosed in interface javax.sql.ConnectionEventListenerevent - an event object describing the source of the eventpublic void connectionErrorOccurred(javax.sql.ConnectionEvent event)
connectionErrorOccurred in interface javax.sql.ConnectionEventListenerevent - an event object describing the source of the eventprotected void addProperties(javax.naming.Reference ref)
addProperties in class VirtuosoDataSourcepublic javax.naming.Reference getReference()
throws javax.naming.NamingException
getReference in class VirtuosoDataSourcejavax.naming.NamingExceptionpublic void fill()
throws java.sql.SQLException
java.sql.SQLException - if a error occurspublic java.sql.Connection getConnection()
throws java.sql.SQLException
getConnection in class VirtuosoDataSourcejava.sql.SQLException - if a database-access error occurspublic java.sql.Connection getConnection(java.lang.String user,
java.lang.String password)
throws java.sql.SQLException
getConnection in class VirtuosoDataSourceuser - the database user on whose behalf the Connection is being madepassword - the user's passwordjava.sql.SQLException - if a database-access error occurspublic javax.sql.PooledConnection getPooledConnection()
throws java.sql.SQLException
getPooledConnection in interface javax.sql.ConnectionPoolDataSourcejava.sql.SQLException - if a database-access error occurspublic javax.sql.PooledConnection getPooledConnection(java.lang.String _user,
java.lang.String _password)
throws java.sql.SQLException
getPooledConnection in interface javax.sql.ConnectionPoolDataSource_user - the database user on whose behalf the Connection is being made_password - the user's passwordjava.sql.SQLException - if a database-access error occurspublic int getMinPoolSize()
public void setMinPoolSize(int parm)
throws java.sql.SQLException
parm - a minimum number of physical connectionsjava.sql.SQLException - if an error occurspublic int getMaxPoolSize()
public void setMaxPoolSize(int parm)
throws java.sql.SQLException
parm - a maximum number of physical connectionsjava.sql.SQLException - if an error occurspublic int getInitialPoolSize()
public void setInitialPoolSize(int parm)
throws java.sql.SQLException
parm - a number of physical connectionsjava.sql.SQLException - if an error occurspublic int getMaxIdleTime()
public void setMaxIdleTime(int parm)
throws java.sql.SQLException
parm - a number of secondsjava.sql.SQLException - if an error occurspublic int getPropertyCycle()
public void setPropertyCycle(int parm)
parm - an interval (in seconds)public int getMaxStatements()
public void setMaxStatements(int parm)
throws java.sql.SQLException
parm - a total number of statementsjava.sql.SQLException - if an error occurs