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.CLUSTERDefault cluster.DATABASEDefault database.FORMATDefault format.HOSTDefault server host.MAX_REQUESTSMax requests.MAX_THREADSMax threads.PASSWORDDefault password.PORTDefault server port.PROTOCOLDefault protocol.SERVER_TIME_ZONEServer time zone, defaults toUTC.SERVER_VERSIONServer version, defaults tolatest.SRV_RESOLVEWhether to resolve DNS SRV name usingSrvResolver(e.g.THREAD_KEEPALIVE_TIMEOUTThread keep alive timeout in milliseconds.USERDefault user.WEIGHTDefault server weight.
-
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, 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.
-
CLUSTER
public static final ClickHouseDefaults CLUSTER
Default cluster.
-
HOST
public static final ClickHouseDefaults HOST
Default server host.
-
PROTOCOL
public static final ClickHouseDefaults PROTOCOL
Default protocol.
-
PORT
public static final ClickHouseDefaults PORT
Default server port.
-
WEIGHT
public static final ClickHouseDefaults WEIGHT
Default 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_THREADS
public static final ClickHouseDefaults MAX_THREADS
Max threads.
-
MAX_REQUESTS
public static final ClickHouseDefaults MAX_REQUESTS
Max requests.
-
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.
-
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
-
-