public class NetConnection40 extends NetConnection
NetConnection.ConnectionCreator, NetConnection.DSConnectionInfoConnection.FailoverStatusaddrPat_, BUCKET_AND_SERVER_PROC_QUERY, cnntkn_, connServer, connUrl, connUrl2, crrtkn_, currXACallInfoOffset_, failoverSQLStateArray, getBucketToServerDetails_, gotException_, indoubtTransactions_, MAX_SERVER_LIMIT, msgutil, netAgent_, pendingEndXACallinfoOffset_, pwFactory, rand, readOnlyTransaction_, securityMechanism_, statementFailover_, targetAgent_, targetCmnappc_, targetCmntcpip_, targetRdb_, targetRsyncmgr_, targetSecmgr_, targetSrvclsnm_, targetSrvnam_, targetSrvrlslv_, targetSyncptmgr_, targetXamgr_, xares_agent_, alternateNetServers_, autoCommit_, clientSSLMode_, commBufferSize_, currentSchemaName_, currTXID, databaseMetaData_, databaseName_, dataSource_, DEFAULT_LOGIN_TIMEOUT, DEFAULT_SINGLE_HOP_MAX_CONN_PER_SERVER, defaultIsolation_, disableCancel_, disableStreaming_, disableTXBatching_, dncGeneratedSavepointId_, dncGeneratedSavepointNamePrefix__, doSetSchema_, encryptionManager_, executionSequence, INFINITE_LOGIN_TIMEOUT, inUnitOfWork_, isolation_, isXAConnection_, jdbcReadOnly_, keepAliveCnt_, keepAliveIdle_, keepAliveIntvl_, loadBalance_, lobProcs, loginTimeout_, ncjBatchSize_, ncjCacheSize_, portNumber_, prevSuccessfulSeq, productID_, queryHDFS_, resetConnectionAtFirstSql_, retrieveMessageText_, serverModifyLevel_, serverNameIP_, serverReleaseLevel_, serverVersion, serverVersionLevel_, setSchemaSql_, SINGLE_HOP_MAX_CONN_PER_SERVER, singleHopAttempted, singleHopEnabled_, skipConstraints_, skipListeners_, skipLocks_, successfulExecutionSequence, syncCommits_, TRANSACTION_UNKNOWN, useBoundedQueuePool_, user_, XA_T0_NOT_ASSOCIATED, XA_T1_ASSOCIATED, xaHostVersion_TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE| Constructor and Description |
|---|
NetConnection40(NetLogWriter netLogWriter,
ClientBaseDataSource dataSource,
String user,
String password) |
NetConnection40(NetLogWriter netLogWriter,
int driverManagerLoginTimeout,
String serverName,
int portNumber,
String databaseName,
Properties properties) |
NetConnection40(NetLogWriter netLogWriter,
String ipaddr,
int portNumber,
ClientBaseDataSource dataSource,
boolean isXAConn) |
NetConnection40(NetLogWriter netLogWriter,
String databaseName,
Properties properties) |
NetConnection40(NetLogWriter netLogWriter,
String user,
String password,
ClientBaseDataSource dataSource,
int rmId,
boolean isXAConn) |
NetConnection40(NetLogWriter netLogWriter,
String user,
String password,
ClientBaseDataSource dataSource,
int rmId,
boolean isXAConn,
ClientPooledConnection cpc)
The constructor for the NetConnection40 class which contains
implementations of JDBC 4.0 specific methods in the java.sql.Connection
interface.
|
| Modifier and Type | Method and Description |
|---|---|
void |
abort(Executor executor) |
void |
close()
Close the connection and release its resources.
|
Array |
createArrayOf(String typeName,
Object[] elements) |
NClob |
createNClob() |
SQLXML |
createSQLXML() |
Struct |
createStruct(String typeName,
Object[] attributes) |
Properties |
getClientInfo()
getClientInfo always returns an empty
Properties object since Derby doesn't support
ClientInfoProperties. |
String |
getClientInfo(String name)
getClientInfo always returns a
null String since Derby doesn't support
ClientInfoProperties. |
int |
getNetworkTimeout() |
String |
getSchema() |
Map<String,Class<?>> |
getTypeMap()
Returns the type map for this connection.
|
boolean |
isValid(int timeout)
Checks if the connection has not been closed and is still valid.
|
boolean |
isWrapperFor(Class<?> interfaces)
Returns false unless
interfaces is implemented |
void |
setClientInfo(Properties properties)
setClientInfo will throw a
SQLClientInfoException uless the properties
paramenter is empty, since Derby does not support any
properties. |
void |
setClientInfo(String name,
String value)
setClientInfo will always throw a
SQLClientInfoException since Derby does not support
any properties. |
void |
setNetworkTimeout(Executor executor,
int milliseconds) |
void |
setSchema(String schema) |
<T> T |
unwrap(Class<T> interfaces)
Returns
this if this class implements the interface |
addSpecialRegisters, allowCloseInUOW_, allowLocalCommitRollback_, checkAlternateServerHasEqualOrHigherProductLevel, closeForReuse, closeResources, closeX, completeConnect, completeReset, constructCrrtkn, createNewAgentOrReset, doCloseStatementsOnClose_, doFailoverOnException, doResetNow, finalize, flowConnect, flowReconnect, flowSimpleConnect, getAGENT, getCachedIsolation, getCMNTCPIP, getCnnToken, getConnectionProperties, getConnectionProperties, getDSConnectionInfo, getEncryptionManager, getFailoverStatus, getInputStream, getOutputStream, getProductID, getRDB, getRSYNCMGR, getSavePointToRollbackTo, getSECMGR, getSecurityMechanism, getSendBufferSize, getSequenceNumber, getServerLocation, getServerUrl, getServerUrl, getSocketAndInputOutputStreams, getSQLAM, getSYNCPTMGR, getTargetPublicKey, getTimeout, getTxID, getXAMGR, handleFailover, handleFailover, isConnectionNull, isGlobalPending_, isSnappyDRDAProtocol, markClosed_, newAgent_, newCallableStatement_, newDatabaseMetaData_, newPositionedUpdatePreparedStatement_, newPreparedStatement_, newSectionManager, newStatement_, preAgentInitialize, readCommitSubstitute_, readLocalCommit_, readLocalRollback_, readLocalXACommit_, readLocalXARollback_, readLocalXAStart_, readTransactionStart, readXACommit_, readXARollback_, reset_, resetCallableStatement_, resetNetConnection, resetPreparedStatement_, resetStatement_, serverSupportsLayerBStreaming, serverSupportsLocators, serverSupportsQryclsimp, serverSupportsUDTs, setBaseConnection, setConnectionNull, setIndoubtTransactions, setInputStream, setOutputStream, setReadOnlyTransactionFlag, setSendBufferSize, setServerURL, setServerVersion, setTimeout, setTXID, supportsSessionDataCaching, toString, updateRegionInfoForCommit, willAutoCommitGenerateFlow, writeCommitSubstitute_, writeLocalCommit_, writeLocalRollback_, writeLocalXACommit_, writeLocalXARollback_, writeLocalXAStart_, writeTransactionStart, writeXACommit_, writeXARollback_, writeXATransactionStartaccumulate440WarningForMessageProcFailure, accumulate444WarningForMessageProcFailure, accumulateWarning, cancelDisabled, checkForClosedConnection, clearWarnings, clearWarningsX, closeForReuse, commit, completeAbnormalUnitOfWork, completeAbnormalUnitOfWork, completeChainBreakingDisconnect, completeInitialPiggyBackIsolation, completeInitialPiggyBackSchema, completeLocalCommit, completeLocalRollback, completePiggyBackIsolation, completePiggyBackSchema, completeReset, completeReset, completeServerVersion, completeSpecificRollback, completeSqlca, createBlob, createClob, createStatement, createStatement, createStatement, flowAutoCommit, flowCommit, flowRollback, getAutoCommit, getCatalog, getCurrentSchemaName, getHoldability, getMetaData, getServerVersion, getTransactionID, getTransactionIsolation, getTransactionIsolationX, getWarnings, getXAState, incrementAndGetExecutionSequence, init, initConnection, initialize, isClosed, isClosedX, isOpen, isPhysicalConnClosed, isReadOnly, isSingleHopEnabled, isXAConnection, lightReset, locatorProcedureCall, markClosed, markClosed, markOpen, nativeSQL, nativeSQLX, prepareCall, prepareCall, prepareCall, prepareMessageProc, preparePositionedUpdateStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, readCommit, readRollback, releaseSavepoint, reset, resetConnection, resetPrepareCall, resetPrepareStatement, resetStatement, rollback, rollback, setAutoCommit, setAutoCommitX, setCatalog, setCurrentSchema, setHoldability, setInUnitOfWork, setReadOnly, setSavepoint, setSavepoint, setTransactionIsolation, setTransactionIsolationX, setTypeMap, setXAState, transactionInProgress, writeCommit, writeRollbackpublic NetConnection40(NetLogWriter netLogWriter, String databaseName, Properties properties) throws SqlException
SqlExceptionpublic NetConnection40(NetLogWriter netLogWriter, ClientBaseDataSource dataSource, String user, String password) throws SqlException
SqlExceptionpublic NetConnection40(NetLogWriter netLogWriter, int driverManagerLoginTimeout, String serverName, int portNumber, String databaseName, Properties properties) throws SqlException
SqlExceptionpublic NetConnection40(NetLogWriter netLogWriter, String user, String password, ClientBaseDataSource dataSource, int rmId, boolean isXAConn) throws SqlException
SqlExceptionpublic NetConnection40(NetLogWriter netLogWriter, String ipaddr, int portNumber, ClientBaseDataSource dataSource, boolean isXAConn) throws SqlException
SqlExceptionpublic NetConnection40(NetLogWriter netLogWriter, String user, String password, ClientBaseDataSource dataSource, int rmId, boolean isXAConn, ClientPooledConnection cpc) throws SqlException
this on to the associated
prepared statement object thus enabling the prepared statement object
to inturn raise the statement events to the ClientPooledConnection object.netLogWriter - NetLogWriter object associated with this connection.user - user id for this connection.password - password for this connection.dataSource - The DataSource object passed from the PooledConnection
object from which this constructor was called.rmId - The Resource manager ID for XA ConnectionsisXAConn - true if this is a XA connection.cpc - The ClientPooledConnection object from which this
NetConnection constructor was called. This is used
to pass StatementEvents back to the pooledConnection
object.SqlExceptionpublic Array createArrayOf(String typeName, Object[] elements) throws SQLException
SQLExceptionpublic NClob createNClob() throws SQLException
SQLExceptionpublic SQLXML createSQLXML() throws SQLException
SQLExceptionpublic Struct createStruct(String typeName, Object[] attributes) throws SQLException
SQLExceptionpublic boolean isValid(int timeout)
throws SQLException
timeout - The time in seconds to wait for the database
operation used to validate the connection to complete. If the
timeout period expires before the operation completes, this
method returns false. A value of 0 indicates a timeout is not
applied to the database operation.SQLException - if the parameter value is illegal or if a
database error has occuredpublic void close()
throws SQLException
close in interface AutoCloseableclose in interface Connectionclose in class NetConnectionSQLException - if a database-access error occurs.public void setClientInfo(String name, String value) throws SQLClientInfoException
setClientInfo will always throw a
SQLClientInfoException since Derby does not support
any properties.name - a property key Stringvalue - a property value StringSQLException - always.SQLClientInfoExceptionpublic void setClientInfo(Properties properties) throws SQLClientInfoException
setClientInfo will throw a
SQLClientInfoException uless the properties
paramenter is empty, since Derby does not support any
properties. All the property keys in the
properties parameter are added to failedProperties
of the exception thrown, with REASON_UNKNOWN_PROPERTY as the
value.properties - a Properties object with the
properties to set.SQLClientInfoException - unless the properties
parameter is null or empty.public String getClientInfo(String name) throws SQLException
getClientInfo always returns a
null String since Derby doesn't support
ClientInfoProperties.name - a String valuenull String valueSQLException - if the connection is closed.public Properties getClientInfo() throws SQLException
getClientInfo always returns an empty
Properties object since Derby doesn't support
ClientInfoProperties.Properties object.SQLException - if the connection is closed.public final Map<String,Class<?>> getTypeMap() throws SQLException
getTypeMap in interface ConnectiongetTypeMap in class ConnectionSQLException - if a database access error occurspublic boolean isWrapperFor(Class<?> interfaces) throws SQLException
interfaces is implementedinterfaces - a Class defining an interface.SQLException - if an error occurs while determining
whether this is a wrapper for an object
with the given interface.public <T> T unwrap(Class<T> interfaces) throws SQLException
this if this class implements the interfaceinterfaces - a Class defining an interfaceSQLException - if no object if found that implements the
interfacepublic void setSchema(String schema) throws SQLException
SQLExceptionpublic String getSchema() throws SQLException
SQLExceptionpublic void abort(Executor executor) throws SQLException
SQLExceptionpublic void setNetworkTimeout(Executor executor, int milliseconds) throws SQLException
SQLExceptionpublic int getNetworkTimeout()
throws SQLException
SQLExceptionCopyright © 2010-2015 Pivotal Software, Inc. All rights reserved.