Package com.clickhouse.client.config
Enum ClickHouseClientOption
- java.lang.Object
-
- java.lang.Enum<ClickHouseClientOption>
-
- com.clickhouse.client.config.ClickHouseClientOption
-
- All Implemented Interfaces:
ClickHouseOption
,Serializable
,Comparable<ClickHouseClientOption>
public enum ClickHouseClientOption extends Enum<ClickHouseClientOption> implements ClickHouseOption
Generic client options.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ASYNC
Whether the client should run in async mode(e.g.CLIENT_NAME
Client name.COMPRESS
Whether server will compress response to client or not.COMPRESS_ALGORITHM
Compression algorithm server will use to compress response, whenCOMPRESS
istrue
.COMPRESS_LEVEL
Compression level for compressing server response.CONNECTION_TIMEOUT
Connection timeout in milliseconds.DATABASE
Default database.DECOMPRESS
Whether server will decompress request from client or not.DECOMPRESS_ALGORITHM
Compression algorithm server will use to decompress request, whenDECOMPRESS
istrue
.DECOMPRESS_LEVEL
Compression level for decompress client request.FORMAT
Default format.LOG_LEADING_COMMENT
Whether to log leading comment(as log_comment in system.query_log) of the query.MAX_BUFFER_SIZE
Maximum buffer size in byte used for streaming.MAX_COMPRESS_BLOCK_SIZE
Maximum comression block size in byte, only useful whenDECOMPRESS
istrue
.MAX_EXECUTION_TIME
Maximum query execution time in seconds.MAX_QUEUED_BUFFERS
Maximum queued in-memory buffers.MAX_QUEUED_REQUESTS
Maxium queued requests.MAX_RESULT_ROWS
Maximum rows allowed in the result.MAX_THREADS_PER_CLIENT
Maximum size of thread pool for each client.RETRY
Whether to enable retry.REUSE_VALUE_WRAPPER
Whether to reuse wrapper of value(e.g.SERVER_TIME_ZONE
Server timezone.SERVER_VERSION
Server version.SESSION_CHECK
Whether to check if session id is validate.SESSION_TIMEOUT
Session timeout in milliseconds.SOCKET_TIMEOUT
Socket timeout in milliseconds.SSL
Whether to enable SSL for the connection.SSL_CERTIFICATE
SSL certificiate.SSL_KEY
SSL key.SSL_MODE
SSL mode.SSL_ROOT_CERTIFICATE
SSL root certificiate.USE_OBJECTS_IN_ARRAYS
Whether to use objects in array or not.USE_SERVER_TIME_ZONE
Whether to use server time zone.USE_SERVER_TIME_ZONE_FOR_DATES
Whether to use time zone from server for Date.USE_TIME_ZONE
Custom time zone.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ClickHouseClientOption
fromKey(String key)
Gets client option by key.Serializable
getDefaultValue()
Gets default value of the option.String
getDescription()
Gets description of the option.String
getKey()
Gets key of the option.Class<? extends Serializable>
getValueType()
Gets value type of the option.static ClickHouseClientOption
valueOf(String name)
Returns the enum constant of this type with the specified name.static ClickHouseClientOption[]
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 interface com.clickhouse.client.config.ClickHouseOption
getDefaultValueFromEnvVar, getDefaultValueFromSysProp, getEffectiveDefaultValue, getEffectiveValue, getPrefix, name
-
-
-
-
Enum Constant Detail
-
ASYNC
public static final ClickHouseClientOption ASYNC
Whether the client should run in async mode(e.g.ClickHouseClient.execute(com.clickhouse.client.ClickHouseRequest)
in a separate thread).
-
CLIENT_NAME
public static final ClickHouseClientOption CLIENT_NAME
Client name.
-
COMPRESS
public static final ClickHouseClientOption COMPRESS
Whether server will compress response to client or not.
-
DECOMPRESS
public static final ClickHouseClientOption DECOMPRESS
Whether server will decompress request from client or not.
-
COMPRESS_ALGORITHM
public static final ClickHouseClientOption COMPRESS_ALGORITHM
Compression algorithm server will use to compress response, whenCOMPRESS
istrue
.
-
DECOMPRESS_ALGORITHM
public static final ClickHouseClientOption DECOMPRESS_ALGORITHM
Compression algorithm server will use to decompress request, whenDECOMPRESS
istrue
.
-
COMPRESS_LEVEL
public static final ClickHouseClientOption COMPRESS_LEVEL
Compression level for compressing server response.
-
DECOMPRESS_LEVEL
public static final ClickHouseClientOption DECOMPRESS_LEVEL
Compression level for decompress client request.
-
CONNECTION_TIMEOUT
public static final ClickHouseClientOption CONNECTION_TIMEOUT
Connection timeout in milliseconds.
-
DATABASE
public static final ClickHouseClientOption DATABASE
Default database.
-
FORMAT
public static final ClickHouseClientOption FORMAT
Default format.
-
LOG_LEADING_COMMENT
public static final ClickHouseClientOption LOG_LEADING_COMMENT
Whether to log leading comment(as log_comment in system.query_log) of the query.
-
MAX_BUFFER_SIZE
public static final ClickHouseClientOption MAX_BUFFER_SIZE
Maximum buffer size in byte used for streaming.
-
MAX_COMPRESS_BLOCK_SIZE
public static final ClickHouseClientOption MAX_COMPRESS_BLOCK_SIZE
Maximum comression block size in byte, only useful whenDECOMPRESS
istrue
.
-
MAX_EXECUTION_TIME
public static final ClickHouseClientOption MAX_EXECUTION_TIME
Maximum query execution time in seconds.
-
MAX_QUEUED_BUFFERS
public static final ClickHouseClientOption MAX_QUEUED_BUFFERS
Maximum queued in-memory buffers.
-
MAX_QUEUED_REQUESTS
public static final ClickHouseClientOption MAX_QUEUED_REQUESTS
Maxium queued requests. WhenMAX_THREADS_PER_CLIENT
is greater than zero, this will also be applied to client's thread pool as well.
-
MAX_RESULT_ROWS
public static final ClickHouseClientOption MAX_RESULT_ROWS
Maximum rows allowed in the result.
-
MAX_THREADS_PER_CLIENT
public static final ClickHouseClientOption MAX_THREADS_PER_CLIENT
Maximum size of thread pool for each client.
-
RETRY
public static final ClickHouseClientOption RETRY
Whether to enable retry.
-
REUSE_VALUE_WRAPPER
public static final ClickHouseClientOption REUSE_VALUE_WRAPPER
Whether to reuse wrapper of value(e.g. ClickHouseValue or ClickHouseRecord) for memory efficiency.
-
SERVER_TIME_ZONE
public static final ClickHouseClientOption SERVER_TIME_ZONE
Server timezone.
-
SERVER_VERSION
public static final ClickHouseClientOption SERVER_VERSION
Server version.
-
SESSION_CHECK
public static final ClickHouseClientOption SESSION_CHECK
Whether to check if session id is validate.
-
SESSION_TIMEOUT
public static final ClickHouseClientOption SESSION_TIMEOUT
Session timeout in milliseconds.
-
SOCKET_TIMEOUT
public static final ClickHouseClientOption SOCKET_TIMEOUT
Socket timeout in milliseconds.
-
SSL
public static final ClickHouseClientOption SSL
Whether to enable SSL for the connection.
-
SSL_MODE
public static final ClickHouseClientOption SSL_MODE
SSL mode.
-
SSL_ROOT_CERTIFICATE
public static final ClickHouseClientOption SSL_ROOT_CERTIFICATE
SSL root certificiate.
-
SSL_CERTIFICATE
public static final ClickHouseClientOption SSL_CERTIFICATE
SSL certificiate.
-
SSL_KEY
public static final ClickHouseClientOption SSL_KEY
SSL key.
-
USE_OBJECTS_IN_ARRAYS
public static final ClickHouseClientOption USE_OBJECTS_IN_ARRAYS
Whether to use objects in array or not.
-
USE_SERVER_TIME_ZONE
public static final ClickHouseClientOption USE_SERVER_TIME_ZONE
Whether to use server time zone.
-
USE_SERVER_TIME_ZONE_FOR_DATES
public static final ClickHouseClientOption USE_SERVER_TIME_ZONE_FOR_DATES
Whether to use time zone from server for Date.
-
USE_TIME_ZONE
public static final ClickHouseClientOption USE_TIME_ZONE
Custom time zone. Only works whenuse_server_time_zone
is set to false.
-
-
Method Detail
-
values
public static ClickHouseClientOption[] 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 (ClickHouseClientOption c : ClickHouseClientOption.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ClickHouseClientOption 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 nameNullPointerException
- if the argument is null
-
fromKey
public static ClickHouseClientOption fromKey(String key)
Gets client option by key.- Parameters:
key
- key of the option- Returns:
- client option object, or null if not found
-
getDefaultValue
public Serializable getDefaultValue()
Description copied from interface:ClickHouseOption
Gets default value of the option.- Specified by:
getDefaultValue
in interfaceClickHouseOption
- Returns:
- default value of the option
-
getDescription
public String getDescription()
Description copied from interface:ClickHouseOption
Gets description of the option.- Specified by:
getDescription
in interfaceClickHouseOption
- Returns:
- description of the option
-
getKey
public String getKey()
Description copied from interface:ClickHouseOption
Gets key of the option.- Specified by:
getKey
in interfaceClickHouseOption
- Returns:
- key of the option
-
getValueType
public Class<? extends Serializable> getValueType()
Description copied from interface:ClickHouseOption
Gets value type of the option.- Specified by:
getValueType
in interfaceClickHouseOption
- Returns:
- value type of the option, defaults to String
-
-