Interface IgniteJdbcStatement

All Superinterfaces:
AutoCloseable, Statement, Wrapper

public interface IgniteJdbcStatement extends Statement
Extension of the 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);
 
  • Method Details

    • getMemoryQuotaBlockSize

      @Nullable @Nullable Long getMemoryQuotaBlockSize() throws SQLException
      Returns memory quota block size for this statement.
      Returns:
      Memory quota block size in bytes, or null if system default is used.
      Throws:
      SQLException
    • setMemoryQuotaBlockSize

      void setMemoryQuotaBlockSize(@Nullable @Nullable Long memoryQuotaBlockSize) throws SQLException
      Sets a memory quota block size for this statement.
      Parameters:
      memoryQuotaBlockSize - Memory quota block size in bytes, or null to use the system default.
      Throws:
      SQLException
    • isAllowFollowerReads

      @Nullable @Nullable Boolean isAllowFollowerReads() throws SQLException
      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-null value 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:
      True if read from non-primary replicas is allowed for the statement, false if disallowed, null if the cluster-wide setting is used (default behavior).
      Throws:
      SQLException
    • setAllowFollowerReads

      void setAllowFollowerReads(@Nullable @Nullable Boolean allowFollowerReads) throws SQLException
      Sets whether the SQL engine is allowed to read data from non-primary replicas for this statement.

      Affects read-only statements only. A non-null value takes precedence over the connection-level value (see IgniteJdbcConnection#setAllowFollowerReads) and the cluster-wide sql.allowFollowerReads setting; null falls 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 - True to allow read from non-primary replicas for the statement, false to disallow, null to use the cluster-wide setting (default behavior).
      Throws:
      SQLException