Package org.apache.ignite.jdbc
Interface IgniteJdbcConnection
- All Superinterfaces:
AutoCloseable,Connection,Wrapper
Extension of the
Connection interface that exposes Ignite-specific configuration options.
Use Wrapper.unwrap(Class) to obtain an instance of this interface from a standard Connection:
Connection conn = ...
conn.unwrap(IgniteJdbcConnection.class)
.setTransactionTimeout(5000L);
-
Field Summary
Fields inherited from interface java.sql.Connection
TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the transaction timeout, in milliseconds, applied to transactions started on this connection.voidsetTransactionTimeout(@Nullable Long timeout) Sets the transaction timeout, in milliseconds, for transactions started on this connection.Methods inherited from interface java.sql.Connection
abort, beginRequest, clearWarnings, close, commit, createArrayOf, createBlob, createClob, createNClob, createSQLXML, createStatement, createStatement, createStatement, createStruct, endRequest, 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, setShardingKey, setShardingKey, setShardingKeyIfValid, setShardingKeyIfValid, setTransactionIsolation, setTypeMapMethods inherited from interface java.sql.Wrapper
isWrapperFor, unwrap
-
Method Details
-
getTransactionTimeout
Returns the transaction timeout, in milliseconds, applied to transactions started on this connection.- Returns:
- Transaction timeout in milliseconds, or
0if the cluster-wide default is used. - Throws:
SQLException
-
setTransactionTimeout
Sets the transaction timeout, in milliseconds, for transactions started on this connection. Overrides the value supplied via thetransactionTimeoutMillisconnection property. The new value applies to transactions started after this call; transactions already in progress are not affected.- Parameters:
timeout- Transaction timeout in milliseconds, ornull(or0) to use the cluster-wide default.- Throws:
SQLException- On error.
-