|
Oracle®Database JDBC Java API Reference 12c Release 1 (12.1.0.2) E56669-01 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
oracle.jdbc.replay.OracleDataSourceImpl
public class OracleDataSourceImpl
JDBC Data Source that supports transparent JDBC operation replay upon a failover.
| Field Summary | |
|---|---|
protected oracle.jdbc.internal.OpaqueString |
password |
protected String |
user |
| Fields inherited from interface oracle.jdbc.replay.OracleDataSource |
|---|
CONNECTION_PROPERTIES, DATA_SOURCE_NAME, DATABASE_NAME, DESCRIPTION, EXPLICIT_CACHING_ENABLED, IMPLICIT_CACHING_ENABLED, MAX_STATEMENTS, NETWORK_PROTOCOL, PASSWORD, PORT_NUMBER, ROLE_NAME, SERVER_NAME, URL, USER |
| Constructor Summary | |
|---|---|
OracleDataSourceImpl() |
|
| Method Summary | ||
|---|---|---|
void |
clearReplayStatistics()Clears replay statistics accumulated so far on all connection created by this data source. |
|
Connection |
getConnection() |
|
Connection |
getConnection(String username, String passwd)Attempts to obtain a database connection with the specified user and password. |
|
ConnectionInitializationCallback |
getConnectionInitializationCallback()Obtains the registered connection initialization callback, if any. |
|
Connection |
getConnectionNoProxy(String origUsr, String origPwd) |
|
Properties |
getConnectionProperties()Gets the connection properties that are set on this data source. |
|
String |
getConnectionProperty(String propertyName)Gets the specified connection property that are set on this data source. |
|
String |
getDatabaseName()Gets the database name. |
|
String |
getDataSourceName()Gets the data source name. |
|
String |
getDescription()Gets the data source description. |
|
boolean |
getExplicitCachingEnabled()Returns the current value of the explicitCachingEnabled property. |
|
boolean |
getImplicitCachingEnabled()getImplicitCachingEnabled Returns the current value of the implicitCachingEnabled property. |
|
int |
getLoginTimeout() |
|
PrintWriter |
getLogWriter() |
|
int |
getMaxStatements()Returns the current value of the maxStatements property. |
|
String |
getNetworkProtocol()Gets the datasource networkProtocol. |
|
Object |
getObjectInstance(Object refObj, Name name, Context nameCtx, Hashtable<?,?> env) |
|
Logger |
getParentLogger() |
|
int |
getPortNumber()Gets the database port number. |
|
oracle.jdbc.proxy.ProxyFactory |
getProxyFactory() |
|
Reference |
getReference() |
|
ReplayStatistics |
getReplayStatistics()Obtains replay statistics accumulated so far. |
|
String |
getRoleName()Gets the datasource role name. |
|
String |
getServerName()Gets the database server name. |
|
String |
getURL()Gets the URL for this data source. |
|
String |
getUser()Gets the user name for this data source. |
|
boolean |
isWrapperFor(Class<?> iface)Since this class is not a wrapper, just check to see if this implements the requested interface. |
|
void |
registerConnectionInitializationCallback(ConnectionInitializationCallback cbk)Registers a ConnectionInitializationCallback with the data source. |
|
void |
setConnectionProperties(Properties connProperties)Sets the connection properties on the data source. |
|
void |
setConnectionProperty(String name, String value)Sets a connection property on the data source. |
|
void |
setDatabaseName(String databaseName)Sets the database name. |
|
void |
setDataSourceName(String dataSourceName)Sets the data source name. |
|
void |
setDescription(String description)Sets the data source description. |
|
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 |
setLoginTimeout(int seconds) |
|
void |
setLogWriter(PrintWriter out) |
|
void |
setMaxStatements(int max)Specifies the value of the maxStatements property. |
|
void |
setNetworkProtocol(String networkProtocol)Sets the datasource networkProtocol. |
|
void |
setPassword(String passwd)Sets the password with which connections have to be obtained. |
|
void |
setPortNumber(int portNumber)Sets the database port number. |
|
void |
setRoleName(String roleName)Sets the datasource role name. |
|
void |
setServerName(String serverName)Sets the database server name. |
|
void |
setURL(String url)Sets the URL that the data source uses to obtain connections to the database. |
|
void |
setUser(String username)Sets the user name with which connections have to be obtained. |
|
void |
unregisterConnectionInitializationCallback(ConnectionInitializationCallback cbk)Removes the ConnectionInitializationCallback registered with the data source, if any. |
|
|
unwrap(Class<T> iface)Since this class is not a wrapper, just check to see if this implements the requested interface. |
|
void |
updateReplayStatistics(oracle.jdbc.replay.internal.ReplayStatistics newStats)Updates replay statistics accumulated so far. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected String user
protected oracle.jdbc.internal.OpaqueString password
| Constructor Detail |
|---|
public OracleDataSourceImpl()
| Method Detail |
|---|
public Connection getConnection()
throws SQLException
getConnection in interface DataSourceSQLException
public Connection getConnection(String username,
String passwd)
throws SQLException
getConnection in interface DataSourceusername - The database user on whose behalf the connection is being made.passwd - The user's password.SQLException - if a database-access error occurs.
public Connection getConnectionNoProxy(String origUsr,
String origPwd)
throws SQLException
SQLException
public PrintWriter getLogWriter()
throws SQLException
getLogWriter in interface CommonDataSourceSQLException
public void setLogWriter(PrintWriter out)
throws SQLException
setLogWriter in interface CommonDataSourceSQLException
public void setLoginTimeout(int seconds)
throws SQLException
setLoginTimeout in interface CommonDataSourceSQLException
public int getLoginTimeout()
throws SQLException
getLoginTimeout in interface CommonDataSourceSQLExceptionpublic String getUser()
OracleDataSourcegetUser in interface OracleDataSource
public void setUser(String username)
throws SQLException
OracleDataSourcesetUser in interface OracleDataSourceusername - Username to be set.SQLException
public void setPassword(String passwd)
throws SQLException
OracleDataSourcesetPassword in interface OracleDataSourcepasswd - Passowrd to be set.SQLExceptionpublic String getURL()
OracleDataSourcegetURL in interface OracleDataSource
public void setURL(String url)
throws SQLException
OracleDataSourcesetURL in interface OracleDataSourceurl - URL to be set.SQLException
public void setServerName(String serverName)
throws SQLException
setServerName in interface OracleDataSourceserverName - Database server name to be set.SQLExceptionpublic String getServerName()
getServerName in interface OracleDataSource
public void setPortNumber(int portNumber)
throws SQLException
setPortNumber in interface OracleDataSourceportNumber - Database port number to be set.SQLExceptionpublic int getPortNumber()
getPortNumber in interface OracleDataSource
public void setDatabaseName(String databaseName)
throws SQLException
setDatabaseName in interface OracleDataSourcedatabaseName - Database name to be set.SQLExceptionpublic String getDatabaseName()
getDatabaseName in interface OracleDataSource
public void setDataSourceName(String dataSourceName)
throws SQLException
setDataSourceName in interface OracleDataSourcedataSourceName - data source name to be set.SQLExceptionpublic String getDataSourceName()
getDataSourceName in interface OracleDataSource
public void setDescription(String description)
throws SQLException
setDescription in interface OracleDataSourcedescription - data source description to be set.SQLExceptionpublic String getDescription()
getDescription in interface OracleDataSource
public void setNetworkProtocol(String networkProtocol)
throws SQLException
setNetworkProtocol in interface OracleDataSourcenetworkProtocol - datasource networkProtocol to be set.SQLExceptionpublic String getNetworkProtocol()
getNetworkProtocol in interface OracleDataSource
public void setRoleName(String roleName)
throws SQLException
setRoleName in interface OracleDataSourceroleName - datasource role name to be set.SQLExceptionpublic String getRoleName()
getRoleName in interface OracleDataSource
public void registerConnectionInitializationCallback(ConnectionInitializationCallback cbk)
throws SQLException
registerConnectionInitializationCallback in interface OracleDataSourcecbk - The ConnectionInitializationCallback to be registered.SQLException - If the argument is null or callback registration fails.
public void unregisterConnectionInitializationCallback(ConnectionInitializationCallback cbk)
throws SQLException
unregisterConnectionInitializationCallback in interface OracleDataSourcecbk - The ConnectionInitializationCallback object to be unregistered.SQLException - If callback removal fails.public ConnectionInitializationCallback getConnectionInitializationCallback()
OracleDataSourcegetConnectionInitializationCallback in interface OracleDataSourceConnectionInitializationCallback, or null if there is no callback registered.public Properties getConnectionProperties()
getConnectionProperties in interface OracleDataSourcepublic String getConnectionProperty(String propertyName)
getConnectionProperty in interface OracleDataSourcepropertyName - The name of the specified property.
public void setConnectionProperty(String name,
String value)
throws SQLException
setConnectionProperty in interface OracleDataSourcename - The name of the connection property to be set.value - The value of the connection property to be set.SQLException - If any exception occurred while setting the connection property.setConnectionProperties
public void setConnectionProperties(Properties connProperties)
throws SQLException
setConnectionProperties in interface OracleDataSourceconnectionProperties - Connection properties to be set.SQLException - If any exception occurred while setting the connection properties.setConnectionFactoryProperties
public void setMaxStatements(int max)
throws SQLException
setMaxStatements in interface OracleDataSourcemax - 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 < 0
public int getMaxStatements()
throws SQLException
getMaxStatements in interface OracleDataSourceSQLException
public void setImplicitCachingEnabled(boolean cache)
throws SQLException
setImplicitCachingEnabled in interface OracleDataSourcecache - If true, then implicit caching is enabled. If false, then any existing statement is purged and the implicit caching is disabled.SQLException
public boolean getImplicitCachingEnabled()
throws SQLException
getImplicitCachingEnabled in interface OracleDataSourceSQLException
public void setExplicitCachingEnabled(boolean cache)
throws SQLException
setExplicitCachingEnabled in interface OracleDataSourcecache - 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.
public boolean getExplicitCachingEnabled()
throws SQLException
getExplicitCachingEnabled in interface OracleDataSourceSQLExceptionpublic ReplayStatistics getReplayStatistics()
OracleDataSourcegetReplayStatistics in interface OracleDataSourcepublic void clearReplayStatistics()
OracleDataSourceclearReplayStatistics in interface OracleDataSource
public Reference getReference()
throws NamingException
getReference in interface ReferenceableNamingException
public Object getObjectInstance(Object refObj,
Name name,
Context nameCtx,
Hashtable<?,?> env)
throws Exception
getObjectInstance in interface ObjectFactoryException
public boolean isWrapperFor(Class<?> iface)
throws SQLException
isWrapperFor in interface Wrapperiface - Requested interface.SQLException - If the argument is not an interface.
public <T> T unwrap(Class<T> iface)
throws SQLException
unwrap in interface Wrapperiface - Requested interface.SQLException - If this does not implement the arg or the arg is not an interface.
public Logger getParentLogger()
throws SQLFeatureNotSupportedException
SQLFeatureNotSupportedExceptionpublic void updateReplayStatistics(oracle.jdbc.replay.internal.ReplayStatistics newStats)
oracle.jdbc.replay.internal.OracleDataSourcenewStats - A new replay statistics object with updated metrics.
public oracle.jdbc.proxy.ProxyFactory getProxyFactory()
throws SQLException
SQLException
|
Oracle®Database JDBC Java API Reference 12c Release 1 (12.1.0.2) E56669-01 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||