public interface OracleCommonDataSource extends CommonDataSource
OracleDataSource, OracleXADataSource and OracleConnectionPoolDataSource and defines the Oracle extensions to the standard JDBC interface CommonDataSource.| Modifier and Type | Method and Description |
|---|---|
default OracleShardingKeyBuilder |
createShardingKeyBuilder()
Creates a new
OracleShardingKeyBuilder instance. |
Properties |
getConnectionProperties()
Gets the Connection Properties that are set in the datasource Returns the current Properties set in the datasource.
|
String |
getDatabaseName()
Gets the name of the database set on this DataSource instance.
|
String |
getDataSourceName()
Gets the datasource name for this instance if set.
|
String |
getDescription()
Get the Desciption of this data source.
|
boolean |
getExplicitCachingEnabled()
Returns the current value of the explicitCachingEnabled property.
|
boolean |
getImplicitCachingEnabled()
getImplicitCachingEnabled Returns the current value of the implicitCachingEnabled property.
|
int |
getMaxStatements()
Returns the current value of the maxStatements property.
|
String |
getNetworkProtocol()
Gets the network protocol set on the datasource.
|
int |
getPortNumber()
Gets the port number on which server is listening for requests.
|
String |
getRoleName()
Gets the data source role name.
|
String |
getServerName()
Gets the name of the server on which database is running.
|
String |
getURL()
Gets the URL for this datasource.
|
String |
getUser()
Gets the user name for this datasource.
|
void |
setConnectionProperties(Properties value)
Sets the Connection Properties for the datasource
|
void |
setDatabaseName(String dbname)
Sets the name of a particular database on a server.
|
void |
setDataSourceName(String dsname)
Sets the datasource name.
|
void |
setDescription(String des)
Sets the Description for this data source instance.
|
void |
setExplicitCachingEnabled(boolean cache)
Sets the value of the explicitCachingEnabled property, which enables or disables the explicit cache.
|
void |
setImplicitCachingEnabled(boolean cache)
Sets the value of the implicitCachingEnabled property, which enables or disables the implicit statement cache.
|
void |
setMaxStatements(int max)
Specifies the value of the maxStatements property.
|
void |
setNetworkProtocol(String np)
Sets the network protocol for the connections.
|
void |
setPassword(String pd)
Sets the password with which connections have to be obtained.
|
void |
setPortNumber(int pn)
Sets the port number where a server is listening for requests.
|
void |
setRoleName(String roleName)
Sets the data source role name.
|
void |
setServerName(String sn)
Sets the name of the Server on which database is running.
|
void |
setURL(String url)
Sets the URL from which connections have to be obtained.
|
void |
setUser(String userName)
Set the user name with which connections have to be obtained.
|
getLoginTimeout, getLogWriter, getParentLogger, setLoginTimeout, setLogWriterdefault OracleShardingKeyBuilder createShardingKeyBuilder() throws SQLException
OracleShardingKeyBuilder instance.SQLException - if an error occurs creating the builderOracleShardingKeyBuildervoid setDataSourceName(String dsname) throws SQLException
dsname - DataSource Name to be set.SQLExceptionString getDataSourceName()
String getDatabaseName()
void setDatabaseName(String dbname) throws SQLException
If URL is set, this property will be ignored.
dsname - database name to be set.SQLExceptionvoid setServerName(String sn) throws SQLException
sn - server/host name to be set.SQLExceptionString getServerName()
void setURL(String url) throws SQLException
url - URL to be set.SQLExceptionString getURL() throws SQLException
SQLExceptionvoid setUser(String userName) throws SQLException
user - Username to be set.SQLExceptionString getUser()
void setPassword(String pd) throws SQLException
pd - Passowrd to be set.SQLExceptionString getDescription()
void setDescription(String des) throws SQLException
des - Desciption to be set.SQLExceptionString getNetworkProtocol()
void setNetworkProtocol(String np) throws SQLException
np - set the network protocol to be used.SQLExceptionvoid setPortNumber(int pn)
throws SQLException
pn - port number on which server is listeningSQLExceptionint getPortNumber()
void setConnectionProperties(Properties value) throws SQLException
The argument to this method is a Properties object. This properties object is used to create the connections returned by the receiver. The keys and values are Strings. The keys, values, and their meanings are defined in oracle.jdbc.OracleConnection.
value - a Properties object with the desired connection property names and values.SQLExceptionOracleConnectionProperties getConnectionProperties() throws SQLException
SQLExceptionvoid setMaxStatements(int max)
throws SQLException
max - Requested size of the cache. If the existing cache size is less than max, statements will be purged to reduce the size.SQLException - if max < 0int getMaxStatements()
throws SQLException
SQLExceptionvoid setImplicitCachingEnabled(boolean cache)
throws SQLException
cache - If true, then implicit caching is enabled. If false, then any existing statement is purged and the implicit caching is disabled.SQLExceptionboolean getImplicitCachingEnabled()
throws SQLException
SQLExceptionvoid setExplicitCachingEnabled(boolean cache)
throws SQLException
cache - If true, then explicit caching is enabled. If false, then any existing statement is purged and the explicit caching is disabled.SQLException - if called on a logical connection.boolean getExplicitCachingEnabled()
throws SQLException
SQLExceptionvoid setRoleName(String roleName) throws SQLException
roleName - data source role name to be set.SQLExceptionString getRoleName()