public class T4DSProperties extends T4Properties
JDBC Type 4 driver data source connetion properties class.
Description: The T4DSProperties class contains all the
properties associated with Type 4 data source connection.
T4DSProperties is inherited by the TrafT4DataSource,
TrafT4ConnectionPooledDataSource
classes for configuring Type 4 connection properties.
The properties passed to the Type 4 driver have this precedence order in event of the values set through more than one option:
1. java.util.properties parameter in the
DriverManager.getConnectioncall or throughDataSource.setXXX()call.2.
java.util.propertiesfile properties set through-Dt4jdbc.propertiesoption.3. Command line properties using -D option. All the system properties passed through the command-line option have to be prefixed with
t4jdbc, to distinguish JDBC Type 4 driver properties from other system properties. For example: propertyuserwhen specified with -D has to be qualified as-Dt4jdbc.user=super.super.
Copyright: (C) Apache Software Foundation (ASF)
| Constructor and Description |
|---|
T4DSProperties() |
T4DSProperties(Properties props) |
| Modifier and Type | Method and Description |
|---|---|
String |
getBlobTableName()
Retrieves the table name used to store BLOB data for all BLOB columns
accessed in the connection using the data source.
|
String |
getCatalog()
Gets the default catalog that will be used to access SQL objects
referenced in SQL statements if the SQL objects are not fully qualified.
|
String |
getClobTableName()
Retrieves the table name used to store CBLOB data for all CLOB columns
accessed in the connection using the data source.
|
int |
getConnectionTimeout() |
String |
getDataSourceName()
Returns the client's data source name.
|
String |
getDescription()
Returns the description associated with the current Type 4 connection.
|
int |
getInitialPoolSize()
Returns the number of physical connections that the pool should be
created with.
|
Locale |
getLocale()
Returns the
java.util.Locale object associated with the
current Type 4 connection. |
int |
getLoginTimeout()
Returns the login timeout value set for the current Type 4 connection.
|
int |
getMaxIdleTime()
Returns the max idle time value associated with this Type 4 connection.
|
int |
getMaxPoolSize()
Returns the maximum number of physical connections that the pool (free
and inuse) should contain.
|
int |
getMaxStatements()
Returns the total number of statements that can be cached.
|
int |
getMinPoolSize()
Returns the number of physical connections the pool should keep in the
free pool.
|
int |
getNetworkTimeout()
Returns the network timeout value set for the current Type 4 connection.
|
long |
getReserveDataLocator()
Returns the value of the reserve data locator length.
|
int |
getRoundingMode()
Returns the rounding mode set for the driver as an Integer value with one
of the following values.
|
String |
getSchema()
Gets the default schema that will be used to access SQL objects
referenced in SQL statements if the SQL objects are not fully qualified.
|
String |
getServerDataSource()
Returns the NDCS server-side data source name used for the current Type 4
connection.
|
String |
getT4LogFile()
Returns the Type 4 log file location associated with the current Type 4
connection.
|
Level |
getT4LogLevel()
Returns the Type 4 log level associated with the current Type 4
connection.
|
String |
getUrl()
Returns the URL used in the current Type 4 connection.
|
String |
getURL()
Deprecated.
Use the
getUrl() to obtain the URL string. |
String |
getUser()
Returns the Safeguard user name associated with this Type 4 connection.
|
void |
setBlobTableName(String blobTableName)
Sets the table name to store and retrieve the BLOB data for all BLOB
columns accessed in the connection using the data source.
|
void |
setCatalog(String catalog)
Sets the default catalog that will be used to access SQL objects
referenced in SQL statements if the SQL objects are not fully qualified.
|
void |
setClobTableName(String clobTableName)
Sets the table name to store and retrieve the CLOB data for all CLOB
columns accessed in the connection using the data source.
|
void |
setConnectionTimeout(int connectionTimeout) |
void |
setConnectionTimeout(String connectionTimeout) |
void |
setDataSourceName(String dataSourceName)
Sets the data source name for the current Type 4 connection.
|
void |
setDescription(String description)
Sets the description for the current Type 4 connection.
|
void |
setInitialPoolSize(int initialPoolSize)
The initial number of physical connections that the pool should be
created with.
|
void |
setInitialPoolSize(String initialPoolSize)
The initial number of physical connections that the pool should be
created with.
|
void |
setLoginTimeout(int loginTimeout)
Sets the login timeout in seconds for the Type 4 connection.
|
void |
setLoginTimeout(String loginTimeout)
Sets the login timeout in seconds for the Type 4 connection.
|
void |
setMaxIdleTime(int maxIdleTime)
Sets the max idle time value for the Type 4 connection.The default is set
to 0 (no timeout).
|
void |
setMaxIdleTime(String maxIdleTime)
Sets the max idle time value for the Type 4 connection.
|
void |
setMaxPoolSize(int maxPoolSize)
The maximum number of physical connections that the pool (free and
in-use) should contain.
|
void |
setMaxPoolSize(String maxPoolSize)
The maximum number of physical connections that the pool (free and
in-use) should contain.
|
void |
setMaxStatements(int maxStatements)
Total number of statements that can be cached.
|
void |
setMaxStatements(String maxStatements)
Total number of statements that can be cached.
|
void |
setMinPoolSize(int minPoolSize)
Sets the number of physical connections the pool should keep available at
all times.
|
void |
setMinPoolSize(String minPoolSize)
Sets the number of physical connections the pool should keep available at
all times.
|
void |
setNetworkTimeout(int networkTimeout)
Sets the network timeout in seconds for the Type 4 connection.
|
void |
setNetworkTimeout(String networkTimeout)
Sets the network timeout in seconds for the Type 4 connection.
|
void |
setPassword(String pwd)
Sets the Safeguard password to be used for authentication when connecting
to the NDCS server.
|
void |
setReserveDataLocator(long reserveDataLocatorLen)
Configures the number of data locators to be reserved by the Type 4
connection.
|
void |
setReserveDataLocator(String reserveDataLocator)
Configures the number of data locators to be reserved by the Type 4
connection.
|
void |
setRoundingMode(int roundMode)
Sets the round mode behaviour for the driver.
|
void |
setRoundingMode(String roundMode)
Sets the round mode behaviour for the driver.
|
void |
setSchema(String schema)
Sets the default schema that will be used to access SQL objects
referenced in SQL statements if the SQL objects are not fully qualified.
|
void |
setServerDataSource(String serverDataSource)
Sets the NDCS server data source name.
|
void |
setT4LogFile(String t4LogFile)
Sets the location of the file to which the logging is to be done.
|
void |
setT4LogLevel(String level)
Sets the logging level for the current Type 4 connection.
|
void |
setUrl(String url)
Sets the URL for the Type 4 connection.
|
Properties |
setURL(String url)
Sets the URL for the Type 4 connection.
|
void |
setUser(String user)
Sets the Safeguard user name to be used while connecting to NDCS server
for authentication.
|
getApplicationName, getCertificateDir, getCertificateFile, getCertificateFileActive, getCompression, getCpuToUse, getDelayedErrorMode, getKeepAlive, getKeepRawFetchBuffer, getLogWriter, getProperties, getReplacementString, getRoleName, getSessionName, getSPJEnv, getTcpNoDelay, getTokenAuth, setApplicationName, setCertificateDir, setCertificateFile, setCertificateFileActive, setCompression, setCompression, setCpuToUse, setCpuToUse, setDelayedErrorMode, setDelayedErrorMode, setKeepAlive, setKeepAlive, setKeepRawFetchBuffer, setKeepRawFetchBuffer, setLogWriter, setReplacementString, setRoleName, setSessionName, setSPJEnv, setSPJEnv, setTcp_NoDelay, setTcpNoDelay, setTokenAuth, setTokenAuthpublic T4DSProperties()
public T4DSProperties(Properties props)
public void setDescription(String description)
description - For the current Type 4 connection.getDescription()public String getDescription()
setDescription(String)public void setDataSourceName(String dataSourceName)
dataSourceName - For the client side DataSource object.getDataSourceName()public String getDataSourceName()
setDataSourceName(String)public void setServerDataSource(String serverDataSource)
serverDataSource - the NDCS data source name to use on the NDCS server side. The
default value is an empty string.#getServerDataSourceName()public String getServerDataSource()
setServerDataSource(String)public void setCatalog(String catalog)
catalog - Database catalog name. The default catalog name is
set by the DCS server-side data source.getCatalog()public String getCatalog()
setCatalog(String)public void setSchema(String schema)
schema - Database schema name. The default schema name is
set by the DCS server side data source.getSchema()public String getSchema()
setSchema(String)public Locale getLocale()
java.util.Locale object associated with the
current Type 4 connection.java.util.Locale object.T4Properties.setLanguage(String language)public void setMaxPoolSize(String maxPoolSize)
SQLException
with
the message "Maximum pool size reached." Specifying a value of 0 (zero)
indicates there is no maximum size for the pool. Specifying a value of -1
indicates no connection pooling is performed. The default value is -1,
indicating that no pooling of physical connections is done.maxPoolSize - the maximum number of physical connections the pool should
contain (free and in use).getMaxPoolSize(),
setMaxPoolSize(int)public void setMaxPoolSize(int maxPoolSize)
SQLException
with
the message "Maximum pool size reached." Specifying a value of 0 (zero)
indicates there is no maximum size for the pool. Specifying a value of -1
indicates no connection pooling is performed. The default value is -1,
indicating that no pooling of physical connections is done.maxPoolSize - the maximum number of physical connections the pool should
contain (free and in use).getMaxPoolSize(),
setMaxPoolSize(String)public int getMaxPoolSize()
setMaxPoolSize(int)public void setMinPoolSize(String minPoolSize)
minPoolSize - Limits the number of physical connection that can be in the
free pool. When the number of physical connections in the free
pool reaches the value of minPoolSize, subsequent connections
that are closed are physically closed and are not added to the
free pool. Specifying a value of 0 means that the value of
minPoolSize is the same as the value of maxPoolSize. If the
value of maxPoolSize is -1, the value of minPoolSize is
ignored. The default value is 0. For this data source, it is
recommended that you use the default value.getMinPoolSize(),
setMinPoolSize(int minPoolSize)public void setMinPoolSize(int minPoolSize)
minPoolSize - Limits the number of physical connection that can be in the
free pool. When the number of physical connections in the free
pool reaches the value of minPoolSize, subsequent connections
that are closed are physically closed and are not added to the
free pool. Specifying a value of 0 means that the value of
minPoolSize is the same as the value of maxPoolSize. If the
value of maxPoolSize is -1, the value of minPoolSize is
ignored. The default value is 0. For this data source, it is
recommended that you use the default value.getMinPoolSize(),
setMinPoolSize(String minPoolSize)public int getMinPoolSize()
setMinPoolSize(int),
setMaxPoolSize(int)public void setInitialPoolSize(String initialPoolSize)
initialPoolSize - the initial number of physical connections the pool should be
created with.setInitialPoolSize(int)public void setInitialPoolSize(int initialPoolSize)
initialPoolSize - the initial number of physical connections the pool should be
created with.setInitialPoolSize(String)public int getInitialPoolSize()
setInitialPoolSize(int)public void setMaxStatements(String maxStatements)
maxStatements - The number of statements that can be cached.setMaxStatements(int)public void setMaxStatements(int maxStatements)
maxStatements - The number of statements that can be cached.setMaxStatements(String)public int getMaxStatements()
public String getURL()
getUrl() to obtain the URL string.jdbc:t4jdbc://host:port/:getUrl()public Properties setURL(String url) throws SQLException
jdbc:t4jdbc://host:port/:prop-name=value.
This validates the URL value and throws SQLException if the URL value is
incorrect.url - the URL.SQLExceptiongetUrl()public String getUrl()
jdbc:t4jdbc://host:port/[:][prop-name=value][,prop-name=value]...getUrl in class T4PropertiessetUrl(String)public void setUrl(String url)
jdbc:t4jdbc://host:port/[:][prop-name=value][,prop-name=value]...
This method does not validate the URL value.url - the URL.getUrl()public void setUser(String user)
user - Sets the user for the current Type 4 connection.getUser()public String getUser()
setUser(String)public void setPassword(String pwd)
pwd - The Safeguard password for the current Type 4 connection.public void setLoginTimeout(String loginTimeout)
loginTimeout - The login timeout value in seconds.setLoginTimeout(int),
getLoginTimeout()public void setLoginTimeout(int loginTimeout)
loginTimeout - The login timeout value in seconds.setLoginTimeout(String),
getLoginTimeout()public int getLoginTimeout()
setLoginTimeout(int),
setLoginTimeout(String)public void setNetworkTimeout(String networkTimeout)
networkTimeout - The network timeout value in seconds.setNetworkTimeout(int),
getNetworkTimeout()public void setNetworkTimeout(int networkTimeout)
networkTimeout - The network timeout value in seconds.setNetworkTimeout(String),
getNetworkTimeout()public int getNetworkTimeout()
setNetworkTimeout(int),
setNetworkTimeout(String)public void setConnectionTimeout(String connectionTimeout)
public void setConnectionTimeout(int connectionTimeout)
public void setMaxIdleTime(String maxIdleTime)
maxIdleTime - The timeout value in seconds.setMaxIdleTime(int)public void setMaxIdleTime(int maxIdleTime)
maxIdleTime - The timeout value in seconds.setMaxIdleTime(String)public int getConnectionTimeout()
public int getMaxIdleTime()
setMaxIdleTime(int)public void setT4LogLevel(String level)
OFF (no logging) SEVERE (highest value) WARNING INFO CONFIG FINE FINER FINEST (lowest value). ALL (log all messages)
level - logging level.getT4LogLevel(),
Levelpublic Level getT4LogLevel()
java.util.logging.Level associated with the
current Type 4 connection.setT4LogLevel(String),
Levelpublic void setT4LogFile(String t4LogFile)
t4LogFile - The Type 4 log file location. If the parameter is null, then
the T4LogFile is set to the global log file.getT4LogFile(),
Loggerpublic String getT4LogFile()
setT4LogFile(String)public void setClobTableName(String clobTableName) throws SQLException
clobTableName - The clob table name, which is in the format
catalog_name.schema_name.clob_table_nameSQLExceptionpublic String getClobTableName()
catalog_name.schema_name.clob_table_namepublic void setBlobTableName(String blobTableName) throws SQLException
blobTableName - the blob table name, which is in the format
catalog_name.schema_name.blob_table_nameSQLExceptionpublic String getBlobTableName()
catalog_name.schema_name.blob_table_namepublic void setReserveDataLocator(String reserveDataLocator)
reserveDataLocator - Sets the value of the reserve data locator length for the
binding) feature.public void setReserveDataLocator(long reserveDataLocatorLen)
reserveDataLocatorLen - Sets the value of the reserve data locator length for the Type
4 connection.public long getReserveDataLocator()
public int getRoundingMode()
T4Properties
static int ROUND_CEILING
Rounding mode to round toward positive infinity.
static int ROUND_DOWN
Rounding mode to round toward zero.
static int ROUND_FLOOR
Rounding mode to round toward negative infinity.
static int ROUND_HALF_DOWN
Rounding mode to round toward "nearest neighbor" unless both
neighbors are equidistant, in which case round down.
static int ROUND_HALF_EVEN
Rounding mode to round toward the "nearest neighbor" unless
both neighbors are equidistant, in which case, round towards the even neighbor.
static int ROUND_HALF_UP
Rounding mode to round toward "nearest neighbor" unless both
neighbors are equidistant, in which case round up.
static int ROUND_UNNECESSARY
Rounding mode to assert that the requested operation has an exact
result; hence no rounding is necessary.
static int ROUND_UP
Rounding mode to round away from zero.
public void setRoundingMode(String roundMode)
roundMode - String value with one of the values:
static int ROUND_CEILING
Rounding mode to round toward positive infinity.
static int ROUND_DOWN
Rounding mode to round toward zero.
static int ROUND_FLOOR
Rounding mode to round toward negative infinity.
static int ROUND_HALF_DOWN
Rounding mode to round toward "nearest neighbor" unless both
neighbors are equidistant, in which case round down.
static int ROUND_HALF_EVEN
Rounding mode to round toward the "nearest neighbor" unless
both neighbors are equidistant, in which case, round towards the even neighbor.
static int ROUND_HALF_UP
Rounding mode to round toward "nearest neighbor" unless both
neighbors are equidistant, in which case round up.
static int ROUND_UNNECESSARY
Rounding mode to assert that the requested operation has an exact
result; hence no rounding is necessary.
static int ROUND_UP
Rounding mode to round away from zero.
The default value is ROUND_HALF_EVEN.public void setRoundingMode(int roundMode)
roundMode - Integer value with one of the values:
static int ROUND_CEILING
Rounding mode to round toward positive infinity.
static int ROUND_DOWN
Rounding mode to round toward zero.
static int ROUND_FLOOR
Rounding mode to round toward negative infinity.
static int ROUND_HALF_DOWN
Rounding mode to round toward "nearest neighbor" unless both
neighbors are equidistant, in which case round down.
static int ROUND_HALF_EVEN
Rounding mode to round toward the "nearest neighbor" unless
both neighbors are equidistant, in which case, round towards the even neighbor.
static int ROUND_HALF_UP
Rounding mode to round toward "nearest neighbor" unless both
neighbors are equidistant, in which case round up.
static int ROUND_UNNECESSARY
Rounding mode to assert that the requested operation has an exact
result; hence no rounding is necessary.
static int ROUND_UP
Rounding mode to round away from zero.
The default value is ROUND_HALF_EVEN.Copyright © 2017. All Rights Reserved.