Enum ClickHouseHttpOption

java.lang.Object
java.lang.Enum<ClickHouseHttpOption>
com.clickhouse.client.http.config.ClickHouseHttpOption
All Implemented Interfaces:
com.clickhouse.config.ClickHouseOption, Serializable, Comparable<ClickHouseHttpOption>, java.lang.constant.Constable

public enum ClickHouseHttpOption extends Enum<ClickHouseHttpOption> implements com.clickhouse.config.ClickHouseOption
Http client options.
  • Enum Constant Details

    • CONNECTION_PROVIDER

      public static final ClickHouseHttpOption CONNECTION_PROVIDER
      HTTP connection provider.
    • CUSTOM_HEADERS

      public static final ClickHouseHttpOption CUSTOM_HEADERS
      Custom HTTP headers.
    • CUSTOM_PARAMS

      public static final ClickHouseHttpOption CUSTOM_PARAMS
    • DEFAULT_RESPONSE

      public static final ClickHouseHttpOption DEFAULT_RESPONSE
      Default server response.
    • KEEP_ALIVE

      public static final ClickHouseHttpOption KEEP_ALIVE
      Whether to enable keep-alive or not.
    • MAX_OPEN_CONNECTIONS

      public static final ClickHouseHttpOption MAX_OPEN_CONNECTIONS
      Max open connections apply with Apache HttpClient only.
    • RECEIVE_QUERY_PROGRESS

      public static final ClickHouseHttpOption RECEIVE_QUERY_PROGRESS
      Whether to receive information about the progress of a query in response headers.
    • SEND_HTTP_CLIENT_ID

      public static final ClickHouseHttpOption SEND_HTTP_CLIENT_ID
      Indicates whether http client would send its identification through Referer header to server. Valid values: 1. empty string - nothing is sent 2. IP_ADDRESS - client's IP address is used 3. HOST_NAME - host name is used
    • WAIT_END_OF_QUERY

      public static final ClickHouseHttpOption WAIT_END_OF_QUERY
    • REMEMBER_LAST_SET_ROLES

      public static final ClickHouseHttpOption REMEMBER_LAST_SET_ROLES
      Whether to remember last set role and send them in every next requests as query parameters. Only one role can be set at a time.
    • AHC_VALIDATE_AFTER_INACTIVITY

      public static final ClickHouseHttpOption AHC_VALIDATE_AFTER_INACTIVITY
      The time in milliseconds after which the connection is validated after inactivity. Default value is 5000 ms. If set to negative value, the connection is never validated. It is used only for Apache Http Client connection provider.
    • AHC_RETRY_ON_FAILURE

      public static final ClickHouseHttpOption AHC_RETRY_ON_FAILURE
      Whether to retry on failure with Apache HTTP Client. Failure includes some 'critical' IO exceptions:
      • org.apache.hc.core5.http.ConnectionClosedException
      • org.apache.hc.core5.http.NoHttpResponseException
      And next status codes:
      • 503 Service Unavailable
    • CONNECTION_REUSE_STRATEGY

      public static final ClickHouseHttpOption CONNECTION_REUSE_STRATEGY
      Configuration for Apache HTTP Client connection pool. It defines how to reuse connections. If "FIFO" is set, the connections are reused in the order they were created. If "LIFO" is set, the connections are reused as soon they are available. Default value is "LIFO".
    • KEEP_ALIVE_TIMEOUT

      public static final ClickHouseHttpOption KEEP_ALIVE_TIMEOUT
      Configures client with preferred connection keep alive timeout if keep alive is enabled. Usually servers tells a client how long it can keep a connection alive. This option can be used when connection should be ended earlier. If value less or equal to 0, the server's timeout is used. Default value is -1. Time unit is milliseconds. Supported only for Apache Http Client connection provider currently.
    • USE_BASIC_AUTHENTICATION

      public static final ClickHouseHttpOption USE_BASIC_AUTHENTICATION
      Whether to use HTTP basic authentication. Default value is true. Password that contain UTF8 characters may not be passed through http headers and BASIC authentication is the only option here.
  • Method Details

    • values

      public static ClickHouseHttpOption[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static ClickHouseHttpOption valueOf(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:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • getDefaultValue

      public Serializable getDefaultValue()
      Specified by:
      getDefaultValue in interface com.clickhouse.config.ClickHouseOption
    • getDescription

      public String getDescription()
      Specified by:
      getDescription in interface com.clickhouse.config.ClickHouseOption
    • getKey

      public String getKey()
      Specified by:
      getKey in interface com.clickhouse.config.ClickHouseOption
    • getValueType

      public Class<? extends Serializable> getValueType()
      Specified by:
      getValueType in interface com.clickhouse.config.ClickHouseOption
    • isSensitive

      public boolean isSensitive()
      Specified by:
      isSensitive in interface com.clickhouse.config.ClickHouseOption