public class IRISConnectionPoolDataSource extends IRISDataSource implements ConnectionPoolDataSource
IRISConnectionPoolDataSource object is an implementation of
ConnectionPoolDataSource interface
In addition to the apis defined by the interface, this class also includes a number
of InterSystems IRIS specific apis. There are apis that can be used to limit (and view) the max
connection pool size, view current pool size, and reset the current connection pool.
Connections should always be obtained by calling getConnection apis, which
are inherited from the DataSource class. getPooledConnection apis
are meant for use within the driver only, and should not be used by the calling
applications.| Modifier and Type | Field and Description |
|---|---|
protected com.intersystems.jdbc.LogFileStream |
logFile |
| Constructor and Description |
|---|
IRISConnectionPoolDataSource() |
| Modifier and Type | Method and Description |
|---|---|
String |
getAccessToken()
Returns a
String representing the current AccessToken. |
int |
getConnectionLifetime()
Returns the connectionLifetime for the DataSource
|
int |
getConnectionSecurityLevel()
Returns an
int representing current Connection Security Level setting. |
int |
getConnectionWaitTimeout()
Returns the current Connection Wait Timeout.
|
String |
getDatabaseName()
Returns a
String representing the current database (InterSystems IRIS Namespace) name. |
String |
getEventClass()
Returns a
String representing the Event Class object. |
com.intersystems.jdbc.LogFileStream |
getLogFile()
Returns a
LogFileStream as the current log file instance. |
String |
getLogFileName()
Returns a
String representing the current log file path. |
PrintWriter |
getLogWriter()
Returns a
PrintWriter as the current log file instance. |
int |
getMaxPoolSize()
Returns the current Connection Pool max size
|
int |
getMinPoolSize()
Returns the current Connection Pool minimum size
|
boolean |
getNodelay()
Returns a
boolean representing the current TCP_NODELAY flag setting. |
String |
getPassword()
Returns a
String representing the current password. |
com.intersystems.jdbc.IRISPool |
getPool()
Returns the current Connection Pool for this DataSource
|
int |
getPoolCount()
Returns the current Connection Pool size
|
PooledConnection |
getPooledConnection()
IMPORTANT: this api SHOULD NOT be used to obtain a pooled connection.
|
PooledConnection |
getPooledConnection(String usr,
String pwd)
IMPORTANT: this api SHOULD NOT be used to obtain a pooled connection.
|
int |
getPortNumber()
Returns an
int representing the current port number. |
String |
getServerName()
Returns a
String representing the current host. |
Boolean |
getSharedMemory()
Returns an
boolean representing whether or not shared memory connections
are enabled for this DataSource object. |
String |
getURL()
Returns a
String representing a current URL for this DataSource object. |
String |
getUser()
Returns a
String representing the current username. |
boolean |
getValidateOnConnect()
Returns the PingOnConnect setting for the DataSource
|
void |
restartConnectionPool()
Restarts a Connection Pool.
|
void |
setAccessToken(String token)
Sets the AccessToken for this
DataSource object. |
void |
setConnectionLifetime(int conLifeTime)
Sets the current ConnectionLifetime
|
void |
setConnectionWaitTimeout(int timeout)
Set the connection wait timeout.
|
void |
setLogFile(com.intersystems.jdbc.LogFileStream lf)
Sets a
LogFileStream as the current log file. |
void |
setLogFile(String fileName)
Sets an
String representing the current log file path. |
protected void |
setLogFileNoThrow(String fileName) |
void |
setLogWriter(PrintWriter pw)
Sets a
PrintWriter as the current log file. |
void |
setMaxPoolSize(int max)
Sets a Connection Pool max size.
|
void |
setMinPoolSize(int min)
Sets the current Connection Pool min size,
This will be the initial number of pooled idle connections established
|
void |
setURL(String u)
Sets the url for this
DataSource object. |
void |
setValidateOnConnect(boolean p)
Sets the current PingOnConnect setting
|
int |
validatePoolCount()
Returns the current Connection Pool size after pinging idle connections
|
getConnection, getConnection, getDataSourceName, getDefaultTransactionIsolation, getDescription, getKeyRecoveryPassword, getLoginTimeout, getParentLogger, getPreparseCacheSize, getServicePrincipalName, getSSLConfigurationName, getStreamPrefetchSize, setCommitTimeout, setConnectionSecurityLevel, setDatabaseName, setDataSourceName, setDefaultTransactionIsolation, setDescription, setEventClass, setKeyRecoveryPassword, setLoginTimeout, setNetworkTimeout, setNodelay, setPassword, setPortNumber, setPreparseCacheSize, setServerName, setServicePrincipalName, setSSLConfigurationName, setStreamPrefetchSize, setUseraddToPool, clone, copy, getFeatureOption, getHash, getSQLDialect, getTransactionIsolationLevel, isPooled, setFeatureOption, setFeatureOption, setSharedMemory, setSQLDialect, setTransactionIsolationLevel, updateConParamsequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetLoginTimeout, getLogWriter, getParentLogger, setLoginTimeout, setLogWriterisWrapperFor, unwrappublic PooledConnection getPooledConnection() throws SQLException
getPooledConnection in interface ConnectionPoolDataSourceSQLException - throws SQLExceptionpublic PooledConnection getPooledConnection(String usr, String pwd) throws SQLException
getPooledConnection in interface ConnectionPoolDataSourceusr - usernamepwd - passwordSQLException - throws SQLExceptionpublic void restartConnectionPool()
throws SQLException
SQLException - throws SQLExceptionpublic int getPoolCount()
public int validatePoolCount()
throws SQLException
SQLException - - failed cleaning connectionspublic com.intersystems.jdbc.IRISPool getPool()
public void setAccessToken(String token) throws SQLException
DataSource object.setAccessToken in class IRISDataSourcetoken - accesstokenSQLExceptionpublic void setMaxPoolSize(int max)
max - max pool sizepublic int getMaxPoolSize()
public void setMinPoolSize(int min)
min - pool sizepublic int getMinPoolSize()
public void setConnectionWaitTimeout(int timeout)
timeout - the connectionWaitTimeout to setpublic int getConnectionWaitTimeout()
public void setConnectionLifetime(int conLifeTime)
conLifeTime - connection lifetimepublic int getConnectionLifetime()
public void setValidateOnConnect(boolean p)
p - ping boolean valuepublic boolean getValidateOnConnect()
public String getURL()
String representing a current URL for this DataSource object.public void setURL(String u) throws SQLException
DataSource object.u - urlSQLException - throws SQLExceptionpublic String getUser()
String representing the current username.public String getPassword()
String representing the current password.public String getAccessToken()
String representing the current AccessToken.public String getServerName()
String representing the current host.public int getPortNumber()
int representing the current port number.public String getDatabaseName()
String representing the current database (InterSystems IRIS Namespace) name.public String getEventClass()
String representing the Event Class object.public boolean getNodelay()
boolean representing the current TCP_NODELAY flag setting.public int getConnectionSecurityLevel()
int representing current Connection Security Level setting.public Boolean getSharedMemory()
boolean representing whether or not shared memory connections
are enabled for this DataSource object.public com.intersystems.jdbc.LogFileStream getLogFile()
LogFileStream as the current log file instance.public void setLogFile(String fileName) throws SQLException
String representing the current log file path.fileName - path and filename of log file to useSQLException - - Invalid log file nameprotected void setLogFileNoThrow(String fileName)
public void setLogFile(com.intersystems.jdbc.LogFileStream lf)
LogFileStream as the current log file.lf - instance of a logfileStream to usepublic PrintWriter getLogWriter()
PrintWriter as the current log file instance.public void setLogWriter(PrintWriter pw)
PrintWriter as the current log file.pw - sets logfile to use this PrintWriterpublic String getLogFileName()
String representing the current log file path.Copyright © 2000-2025 InterSystems Corporation. All rights reserved.