Class SQLServerConnection43
- java.lang.Object
-
- com.microsoft.sqlserver.jdbc.SQLServerConnection
-
- com.microsoft.sqlserver.jdbc.SQLServerConnection43
-
- All Implemented Interfaces:
ISQLServerConnection,ISQLServerConnection43,Serializable,AutoCloseable,Connection,Wrapper
public class SQLServerConnection43 extends SQLServerConnection implements ISQLServerConnection43
ExtendsSQLServerConnection43and implementsISQLServerConnection43with methods introduced in JDBC 4.3 Specifications. This class is used by the driver when initializing a class with with JDBC 4.3 Specs supported JVM.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface java.sql.Connection
TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE
-
Fields inherited from interface com.microsoft.sqlserver.jdbc.ISQLServerConnection
TRANSACTION_SNAPSHOT
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbeginRequest()Hints to the driver that a request, an independent unit of work, is beginning on this connection.voidendRequest()Hints to the driver that a request, an independent unit of work, has completed.voidsetShardingKey(ShardingKey shardingKey)voidsetShardingKey(ShardingKey shardingKey, ShardingKey superShardingKey)booleansetShardingKeyIfValid(ShardingKey shardingKey, int timeout)booleansetShardingKeyIfValid(ShardingKey shardingKey, ShardingKey superShardingKey, int timeout)-
Methods inherited from class com.microsoft.sqlserver.jdbc.SQLServerConnection
abort, clearUserTokenCache, clearWarnings, close, closeUnreferencedPreparedStatementHandles, commit, commit, createArrayOf, createBlob, createClob, createNClob, createSQLXML, createStatement, createStatement, createStatement, createStatement, createStruct, getAccessTokenCallbackClass, getAutoCommit, getcacheBulkCopyMetadata, getCalcBigDecimalPrecision, getCatalog, getClientConnectionId, getClientInfo, getClientInfo, getColumnEncryptionTrustedMasterKeyPaths, getDatetimeParameterType, getDelayLoadingLobs, getDisableStatementPooling, getDiscardedServerPreparedStatementCount, getEnablePrepareOnFirstPreparedStatementCall, getHoldability, getIgnoreOffsetOnDateTimeOffsetConversion, getIPAddressPreference, getMetaData, getMsiTokenCacheTtl, getNetworkTimeout, getPrepareMethod, getSchema, getSendTimeAsDatetime, getServerMessageHandler, getServerPreparedStatementDiscardThreshold, getStatementHandleCacheEntryCount, getStatementPoolingCacheSize, getTransactionIsolation, getTypeMap, getUseBulkCopyForBatchInsert, getUseFlexibleCallableStatements, getUseFmtOnly, getWarnings, isClosed, isReadOnly, isStatementPoolingEnabled, isValid, isWrapperFor, nativeSQL, needsReconnect, prepareCall, prepareCall, prepareCall, prepareCall, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, registerBeforeReconnectListener, registerColumnEncryptionKeyStoreProviders, registerColumnEncryptionKeyStoreProvidersOnConnection, releaseSavepoint, removeBeforeReconnectListener, removeColumnEncryptionTrustedMasterKeyPaths, rollback, rollback, setAccessTokenCallbackClass, setAutoCommit, setcacheBulkCopyMetadata, setCalcBigDecimalPrecision, setCatalog, setClientInfo, setClientInfo, setColumnEncryptionKeyCacheTtl, setColumnEncryptionTrustedMasterKeyPaths, setDatetimeParameterType, setDelayLoadingLobs, setDisableStatementPooling, setEnablePrepareOnFirstPreparedStatementCall, setHoldability, setIgnoreOffsetOnDateTimeOffsetConversion, setIPAddressPreference, setMsiTokenCacheTtl, setNetworkTimeout, setPrepareMethod, setReadOnly, setSavepoint, setSavepoint, setSchema, setSendTimeAsDatetime, setServerMessageHandler, setServerPreparedStatementDiscardThreshold, setStatementPoolingCacheSize, setTransactionIsolation, setTypeMap, setUseBulkCopyForBatchInsert, setUseFlexibleCallableStatements, setUseFmtOnly, toString, unregisterColumnEncryptionKeyStoreProviders, unwrap, updateColumnEncryptionTrustedMasterKeyPaths
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.sql.Connection
abort, clearWarnings, close, commit, createArrayOf, createBlob, createClob, createNClob, createSQLXML, createStatement, createStatement, createStatement, createStruct, getAutoCommit, getCatalog, getClientInfo, getClientInfo, getHoldability, getMetaData, getNetworkTimeout, getSchema, getTransactionIsolation, getTypeMap, getWarnings, isClosed, isReadOnly, isValid, nativeSQL, prepareCall, prepareCall, prepareCall, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, releaseSavepoint, rollback, rollback, setAutoCommit, setCatalog, setClientInfo, setClientInfo, setHoldability, setNetworkTimeout, setReadOnly, setSavepoint, setSavepoint, setSchema, setTransactionIsolation, setTypeMap
-
Methods inherited from interface com.microsoft.sqlserver.jdbc.ISQLServerConnection
closeUnreferencedPreparedStatementHandles, createStatement, getAccessTokenCallbackClass, getcacheBulkCopyMetadata, getCalcBigDecimalPrecision, getClientConnectionId, getDatetimeParameterType, getDelayLoadingLobs, getDisableStatementPooling, getDiscardedServerPreparedStatementCount, getEnablePrepareOnFirstPreparedStatementCall, getIgnoreOffsetOnDateTimeOffsetConversion, getIPAddressPreference, getMsiTokenCacheTtl, getPrepareMethod, getSendTimeAsDatetime, getServerMessageHandler, getServerPreparedStatementDiscardThreshold, getStatementHandleCacheEntryCount, getStatementPoolingCacheSize, getUseBulkCopyForBatchInsert, getUseFmtOnly, isStatementPoolingEnabled, prepareCall, prepareStatement, prepareStatement, prepareStatement, prepareStatement, setAccessTokenCallbackClass, setcacheBulkCopyMetadata, setCalcBigDecimalPrecision, setDatetimeParameterType, setDelayLoadingLobs, setDisableStatementPooling, setEnablePrepareOnFirstPreparedStatementCall, setIgnoreOffsetOnDateTimeOffsetConversion, setIPAddressPreference, setMsiTokenCacheTtl, setPrepareMethod, setSendTimeAsDatetime, setServerMessageHandler, setServerPreparedStatementDiscardThreshold, setStatementPoolingCacheSize, setUseBulkCopyForBatchInsert, setUseFmtOnly
-
Methods inherited from interface java.sql.Wrapper
isWrapperFor, unwrap
-
-
-
-
Method Detail
-
beginRequest
public void beginRequest() throws SQLExceptionDescription copied from interface:ISQLServerConnection43Hints to the driver that a request, an independent unit of work, is beginning on this connection. It backs up the values of the connection properties that are modifiable through public methods. Each request is independent of all other requests with regard to state local to the connection either on the client or the server. Work done betweenbeginRequest,endRequestpairs does not depend on any other work done on the connection either as part of another request or outside of any request. A request may include multiple transactions. There may be dependencies on committed database state as that is not local to the connection.beginRequestmarks the beginning of the work unit.Local state is defined as any state associated with a Connection that is local to the current Connection either in the client or the database that is not transparently reproducible.
Calls to
beginRequestandendRequestare not nested. Multiple calls tobeginRequestwithout an intervening call toendRequestis not an error. The firstbeginRequestcall marks the start of the request and subsequent calls are treated as a no-op It is recommended to enclose each unit of work inbeginRequest,endRequestpairs such that there is no open transaction at the beginning or end of the request and no dependency on local state that crosses request boundaries. Committed database state is not local. This method is to be used by Connection pooling managers.The pooling manager should call
beginRequeston the underlying connection prior to returning a connection to the caller.- Specified by:
beginRequestin interfaceConnection- Specified by:
beginRequestin interfaceISQLServerConnection43- Throws:
SQLException- if an error occurs- See Also:
ISQLServerConnection43.endRequest()
-
endRequest
public void endRequest() throws SQLExceptionDescription copied from interface:ISQLServerConnection43Hints to the driver that a request, an independent unit of work, has completed. It rolls back the open transactions. Resets the connection properties that are modifiable through public methods back to their original values. Calls tobeginRequestandendRequestare not nested. Multiple calls toendRequestwithout an intervening call tobeginRequestis not an error. The firstendRequestcall marks the request completed and subsequent calls are treated as a no-op. IfendRequestis called without an initial call tobeginRequestis a no-op. This method is to be used by Connection pooling managers.- Specified by:
endRequestin interfaceConnection- Specified by:
endRequestin interfaceISQLServerConnection43- Throws:
SQLException- if an error occurs- See Also:
ISQLServerConnection43.beginRequest()
-
setShardingKey
public void setShardingKey(ShardingKey shardingKey) throws SQLException
- Specified by:
setShardingKeyin interfaceConnection- Throws:
SQLException
-
setShardingKey
public void setShardingKey(ShardingKey shardingKey, ShardingKey superShardingKey) throws SQLException
- Specified by:
setShardingKeyin interfaceConnection- Throws:
SQLException
-
setShardingKeyIfValid
public boolean setShardingKeyIfValid(ShardingKey shardingKey, int timeout) throws SQLException
- Specified by:
setShardingKeyIfValidin interfaceConnection- Throws:
SQLException
-
setShardingKeyIfValid
public boolean setShardingKeyIfValid(ShardingKey shardingKey, ShardingKey superShardingKey, int timeout) throws SQLException
- Specified by:
setShardingKeyIfValidin interfaceConnection- Throws:
SQLException
-
-