Package com.clickhouse.config
Interface ClickHouseOption
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
ClickHouseDefaultOption
Deprecated.
This defines a configuration option. To put it in a nutshell, an option is
composed of key, default value(which implies type of the value) and
description.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends Serializable>
TfromString(String value, Class<T> clazz) Deprecated.Converts given string to a typed value.static <T extends Serializable>
TfromString(String value, T defaultValue) Deprecated.Converts given string to typed value.Deprecated.Gets default value of the option.Deprecated.Gets trimmed default value from environment variable.Deprecated.Gets trimmed default value from system property.Deprecated.Gets description of the option.default SerializableDeprecated.Gets effective default value by considering default value defined in system property and environment variable.default <T> TgetEffectiveValue(T value) Deprecated.Gets effective value by considering default value defined in system property and environment variable.default StringDeprecated.Gets environment variable for the option.getKey()Deprecated.Gets key of the option.default StringDeprecated.Gets prefix of environment variable and system property.default StringDeprecated.Gets system property for the option.Class<? extends Serializable>Deprecated.Gets value type of the option.booleanDeprecated.Checks whether the option is sensitive or not.name()Deprecated.Gets name of the option.toKeyValuePairs(String str) Deprecated.Converts given string to key value pairs.
-
Method Details
-
toKeyValuePairs
Deprecated.Converts given string to key value pairs.- Parameters:
str- string- Returns:
- non-null key value pairs
-
fromString
Deprecated.Converts given string to a typed value.- Type Parameters:
T- type of the value- Parameters:
value- value in string formatclazz- non-null class of the value- Returns:
- non-null typed value
-
fromString
Deprecated.Converts given string to typed value. Whenvalueis null or blank,defaultValuewill be returned.- Type Parameters:
T- type of the value- Parameters:
value- value in string formatdefaultValue- non-null default value- Returns:
- non-null typed value
-
getDefaultValue
Serializable getDefaultValue()Deprecated.Gets default value of the option.- Returns:
- default value of the option
-
getDefaultValueFromEnvVar
Deprecated.Gets trimmed default value from environment variable. By default the environment variable is named asgetPrefix()+ "_" +name()in upper case.- Returns:
- trimmed default value defined in environment variable
-
getDefaultValueFromSysProp
Deprecated.Gets trimmed default value from system property. By default the system property is named asgetPrefix()+ "_" +name()in lower case.- Returns:
- trimmed default value defined in system property
-
getDescription
String getDescription()Deprecated.Gets description of the option.- Returns:
- description of the option
-
getEffectiveDefaultValue
Deprecated.Gets effective default value by considering default value defined in system property and environment variable. It's same asgetDefaultValue()if no system property and environment variable defined.- Returns:
- effective default value
-
getEffectiveValue
default <T> T getEffectiveValue(T value) Deprecated.Gets effective value by considering default value defined in system property and environment variable. It's same asgetDefaultValue()if the given value is null and no system property and environment variable defined.- Type Parameters:
T- type of the value- Parameters:
value- default value- Returns:
- effective value
-
getKey
String getKey()Deprecated.Gets key of the option.- Returns:
- key of the option
-
getPrefix
Deprecated.Gets prefix of environment variable and system property.- Returns:
- prefix of environment variable and system property
-
getEnvironmentVariable
Deprecated.Gets environment variable for the option.- Returns:
- environment variable
-
getSystemProperty
Deprecated.Gets system property for the option.- Returns:
- system property
-
getValueType
Class<? extends Serializable> getValueType()Deprecated.Gets value type of the option.- Returns:
- value type of the option, defaults to String
-
isSensitive
boolean isSensitive()Deprecated.Checks whether the option is sensitive or not. A sensitive option should be used carefully and be masked in logging for security reason.- Returns:
- true if the option is sensitive; false otherwise
-
name
String name()Deprecated.Gets name of the option.- Returns:
- name of the option
-