Enum ClientSqlResubmissionMode

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<ClientSqlResubmissionMode>

    public enum ClientSqlResubmissionMode
    extends java.lang.Enum<ClientSqlResubmissionMode>
    The configuration when to retry query that fails with reasons:
    • SqlErrorCode.CONNECTION_PROBLEM
    • SqlErrorCode.PARTITION_DISTRIBUTION
    • SqlErrorCode.TOPOLOGY_CHANGE
    • SqlErrorCode.RESTARTABLE_ERROR
    Since:
    5.2
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      NEVER
      If a query fails, the failure is immediately forwarded to the caller.
      RETRY_ALL
      All queries will be retried after a failure.
      RETRY_SELECTS
      The query will be retried if: no rows were received yet the SQL text starts with `SELECT` (case-insensitive, ignoring white space)
      RETRY_SELECTS_ALLOW_DUPLICATES
      The query will be retried if the SQL text starts with `SELECT` (case-insensitive, ignoring white space).
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static ClientSqlResubmissionMode valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static ClientSqlResubmissionMode[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • NEVER

        public static final ClientSqlResubmissionMode NEVER
        If a query fails, the failure is immediately forwarded to the caller.
      • RETRY_SELECTS

        public static final ClientSqlResubmissionMode RETRY_SELECTS
        The query will be retried if:
        • no rows were received yet
        • the SQL text starts with `SELECT` (case-insensitive, ignoring white space)
      • RETRY_SELECTS_ALLOW_DUPLICATES

        public static final ClientSqlResubmissionMode RETRY_SELECTS_ALLOW_DUPLICATES
        The query will be retried if the SQL text starts with `SELECT` (case-insensitive, ignoring white space). If some rows were received they are going to be duplicated.
    • Method Detail

      • values

        public static ClientSqlResubmissionMode[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (ClientSqlResubmissionMode c : ClientSqlResubmissionMode.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static ClientSqlResubmissionMode valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null