Package com.clickhouse.client.config
Enum ClickHouseDefaults
- java.lang.Object
-
- java.lang.Enum<ClickHouseDefaults>
-
- com.clickhouse.client.config.ClickHouseDefaults
-
- All Implemented Interfaces:
ClickHouseOption,Serializable,Comparable<ClickHouseDefaults>
public enum ClickHouseDefaults extends Enum<ClickHouseDefaults> implements ClickHouseOption
System-wide default options. System properties and environment variables can be set to change default value.For example, by default
ASYNCis set totrue. However, you can change it tofalseby either specifying-Ddefault_async=falseon the Java command line, or setting environment variableDEFAULT_ASYNC=false.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ASYNCDefault execution mode.AUTO_SESSIONWhether to create session automatically when there are multiple queries.BUFFERINGDefault buffering mode.CLUSTERDeprecated.will be removed in v0.3.3DATABASEDefault database.FORMATDefault format.HOSTDefault server host.MAX_REQUESTSMax requests.MAX_SCHEDULER_THREADSMaximum number of threads that the scheduler(shared by all client instances) can use to run the adhoc/scheduled tasks like discovery and health check.MAX_THREADSMax threads.PASSWORDDefault password.PORTDeprecated.will be removed in v0.3.3PROTOCOLDefault protocol.ROUNDING_MODERounding mode for type conversion.SERVER_TIME_ZONEServer time zone, defaults toUTC.SERVER_VERSIONServer version, defaults tolatest.SRV_RESOLVEWhether to resolve DNS SRV name usingSrvResolver(e.g.SSL_CERTIFICATE_TYPESSL certificiate type.SSL_KEY_ALGORITHMSSL key algorithm.SSL_PROTOCOLSSL key.THREAD_KEEPALIVE_TIMEOUTThread keep alive timeout in milliseconds.USERDefault user.WEIGHTDeprecated.will be removed in v0.3.3
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description SerializablegetDefaultValue()Gets default value of the option.StringgetDescription()Gets description of the option.StringgetKey()Gets key of the option.StringgetPrefix()Gets prefix of environment variable and system property.Class<? extends Serializable>getValueType()Gets value type of the option.static ClickHouseDefaultsvalueOf(String name)Returns the enum constant of this type with the specified name.static ClickHouseDefaults[]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, getEnvironmentVariable, getSystemProperty, name
-
-
-
-
Enum Constant Detail
-
ASYNC
public static final ClickHouseDefaults ASYNC
Default execution mode.
-
AUTO_SESSION
public static final ClickHouseDefaults AUTO_SESSION
Whether to create session automatically when there are multiple queries.
-
BUFFERING
public static final ClickHouseDefaults BUFFERING
Default buffering mode.
-
CLUSTER
@Deprecated public static final ClickHouseDefaults CLUSTER
Deprecated.will be removed in v0.3.3Default cluster.
-
HOST
public static final ClickHouseDefaults HOST
Default server host.
-
PROTOCOL
public static final ClickHouseDefaults PROTOCOL
Default protocol.
-
PORT
@Deprecated public static final ClickHouseDefaults PORT
Deprecated.will be removed in v0.3.3Default server port.
-
WEIGHT
@Deprecated public static final ClickHouseDefaults WEIGHT
Deprecated.will be removed in v0.3.3Default server weight.
-
DATABASE
public static final ClickHouseDefaults DATABASE
Default database.
-
USER
public static final ClickHouseDefaults USER
Default user.
-
PASSWORD
public static final ClickHouseDefaults PASSWORD
Default password.
-
FORMAT
public static final ClickHouseDefaults FORMAT
Default format.
-
MAX_SCHEDULER_THREADS
public static final ClickHouseDefaults MAX_SCHEDULER_THREADS
Maximum number of threads that the scheduler(shared by all client instances) can use to run the adhoc/scheduled tasks like discovery and health check.
-
MAX_THREADS
public static final ClickHouseDefaults MAX_THREADS
Max threads.
-
MAX_REQUESTS
public static final ClickHouseDefaults MAX_REQUESTS
Max requests.
-
ROUNDING_MODE
public static final ClickHouseDefaults ROUNDING_MODE
Rounding mode for type conversion.
-
THREAD_KEEPALIVE_TIMEOUT
public static final ClickHouseDefaults THREAD_KEEPALIVE_TIMEOUT
Thread keep alive timeout in milliseconds.
-
SERVER_TIME_ZONE
public static final ClickHouseDefaults SERVER_TIME_ZONE
Server time zone, defaults toUTC.
-
SERVER_VERSION
public static final ClickHouseDefaults SERVER_VERSION
Server version, defaults tolatest.
-
SSL_CERTIFICATE_TYPE
public static final ClickHouseDefaults SSL_CERTIFICATE_TYPE
SSL certificiate type.
-
SSL_KEY_ALGORITHM
public static final ClickHouseDefaults SSL_KEY_ALGORITHM
SSL key algorithm.
-
SSL_PROTOCOL
public static final ClickHouseDefaults SSL_PROTOCOL
SSL key.
-
SRV_RESOLVE
public static final ClickHouseDefaults SRV_RESOLVE
Whether to resolve DNS SRV name usingSrvResolver(e.g. resolve SRV record to extract both host and port from a given name).
-
-
Method Detail
-
values
public static ClickHouseDefaults[] 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 (ClickHouseDefaults c : ClickHouseDefaults.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ClickHouseDefaults 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
-
getDefaultValue
public Serializable getDefaultValue()
Description copied from interface:ClickHouseOptionGets default value of the option.- Specified by:
getDefaultValuein interfaceClickHouseOption- Returns:
- default value of the option
-
getDescription
public String getDescription()
Description copied from interface:ClickHouseOptionGets description of the option.- Specified by:
getDescriptionin interfaceClickHouseOption- Returns:
- description of the option
-
getKey
public String getKey()
Description copied from interface:ClickHouseOptionGets key of the option.- Specified by:
getKeyin interfaceClickHouseOption- Returns:
- key of the option
-
getPrefix
public String getPrefix()
Description copied from interface:ClickHouseOptionGets prefix of environment variable and system property.- Specified by:
getPrefixin interfaceClickHouseOption- Returns:
- prefix of environment variable and system property
-
getValueType
public Class<? extends Serializable> getValueType()
Description copied from interface:ClickHouseOptionGets value type of the option.- Specified by:
getValueTypein interfaceClickHouseOption- Returns:
- value type of the option, defaults to String
-
-