Interface IgniteJdbcStatement
- All Superinterfaces:
AutoCloseable,Statement,Wrapper
Statement interface that exposes Ignite-specific configuration options.
Use Wrapper.unwrap(Class) to obtain an instance of this interface from a standard Statement:
Statement stm = ...
stm.unwrap(IgniteJdbcStatement.class)
.setMemoryQuotaBlockSize(1024L);
-
Field Summary
Fields inherited from interface java.sql.Statement
CLOSE_ALL_RESULTS, CLOSE_CURRENT_RESULT, EXECUTE_FAILED, KEEP_CURRENT_RESULT, NO_GENERATED_KEYS, RETURN_GENERATED_KEYS, SUCCESS_NO_INFO -
Method Summary
Modifier and TypeMethodDescription@Nullable LongReturns memory quota block size for this statement.@Nullable BooleanReturns the effective setting of whether the SQL engine is allowed to read data from non-primary replicas for this statement.voidsetAllowFollowerReads(@Nullable Boolean allowFollowerReads) Sets whether the SQL engine is allowed to read data from non-primary replicas for this statement.voidsetMemoryQuotaBlockSize(@Nullable Long memoryQuotaBlockSize) Sets a memory quota block size for this statement.Methods inherited from interface java.sql.Statement
addBatch, cancel, clearBatch, clearWarnings, close, closeOnCompletion, enquoteIdentifier, enquoteLiteral, enquoteNCharLiteral, execute, execute, execute, execute, executeBatch, executeLargeBatch, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeQuery, executeUpdate, executeUpdate, executeUpdate, executeUpdate, getConnection, getFetchDirection, getFetchSize, getGeneratedKeys, getLargeMaxRows, getLargeUpdateCount, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getUpdateCount, getWarnings, isClosed, isCloseOnCompletion, isPoolable, isSimpleIdentifier, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setLargeMaxRows, setMaxFieldSize, setMaxRows, setPoolable, setQueryTimeoutMethods inherited from interface java.sql.Wrapper
isWrapperFor, unwrap
-
Method Details
-
getMemoryQuotaBlockSize
Returns memory quota block size for this statement.- Returns:
- Memory quota block size in bytes, or
nullif system default is used. - Throws:
SQLException
-
setMemoryQuotaBlockSize
Sets a memory quota block size for this statement.- Parameters:
memoryQuotaBlockSize- Memory quota block size in bytes, ornullto use the system default.- Throws:
SQLException
-
isAllowFollowerReads
Returns the effective setting of whether the SQL engine is allowed to read data from non-primary replicas for this statement.Affects read-only statements only; a non-
nullvalue overrides the cluster-wide setting for this statement.If enabled (
true) spreads read load across all replicas and lets a query read from a local replica, avoiding a network hop. The trade-off is latency, as reading from a follower replica may introduce delays while waiting for the replica to catch up.If disabled (
false) always reads from primaries.- Returns:
Trueif read from non-primary replicas is allowed for the statement,falseif disallowed,nullif the cluster-wide setting is used (default behavior).- Throws:
SQLException
-
setAllowFollowerReads
Sets whether the SQL engine is allowed to read data from non-primary replicas for this statement.Affects read-only statements only. A non-
nullvalue takes precedence over the connection-level value (seeIgniteJdbcConnection#setAllowFollowerReads) and the cluster-widesql.allowFollowerReadssetting;nullfalls back to the connection-level value, then the cluster-wide setting.If enabled (
true) spreads read load across all replicas and lets a query read from a local replica, avoiding a network hop. The trade-off is latency, as reading from a follower replica may introduce delays while waiting for the replica to catch up.If disabled (
false) always reads from primaries.- Parameters:
allowFollowerReads-Trueto allow read from non-primary replicas for the statement,falseto disallow,nullto use the cluster-wide setting (default behavior).- Throws:
SQLException
-