Package com.clickhouse.client
Class ClickHouseClientBuilder
java.lang.Object
com.clickhouse.client.ClickHouseClientBuilder
Deprecated.
Builder class for creating
ClickHouseClient. Please use
ClickHouseClient.builder() for instantiation, and avoid
multi-threading as it's NOT thread-safe.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanDeprecated.protected ClickHouseConfigDeprecated.protected ClickHouseCredentialsDeprecated.protected ObjectDeprecated.protected ClickHouseNodeSelectorDeprecated.protected final Map<ClickHouseOption,Serializable> Deprecated. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDeprecated.Default constructor. -
Method Summary
Modifier and TypeMethodDescriptionagent(boolean agent) Deprecated.Sets whether agent should be used for advanced feature like failover and retry.build()Deprecated.Builds an instance ofClickHouseClient.Deprecated.Removes all options.config(ClickHouseConfig config) Deprecated.Sets configuration.defaultCredentials(ClickHouseCredentials credentials) Deprecated.Sets default credentials, which will be used to connect to aClickHouseNodeonly when it has no credentials defined.Deprecated.Gets client configuration.metricRegistry(Object metricRegistry) Deprecated.Sets metric registry.nodeSelector(ClickHouseNodeSelector nodeSelector) Deprecated.Sets node selector.option(ClickHouseOption option, Serializable value) Deprecated.Adds an option, which is usually an Enum type that implementsClickHouseOption.options(Map<ClickHouseOption, Serializable> options) Deprecated.Sets options.removeOption(ClickHouseOption option) Deprecated.Removes an option.protected voidDeprecated.Resets client configuration to null.
-
Field Details
-
agent
protected boolean agentDeprecated. -
config
Deprecated. -
credentials
Deprecated. -
metricRegistry
Deprecated. -
nodeSelector
Deprecated. -
options
Deprecated.
-
-
Constructor Details
-
ClickHouseClientBuilder
protected ClickHouseClientBuilder()Deprecated.Default constructor.
-
-
Method Details
-
resetConfig
protected void resetConfig()Deprecated.Resets client configuration to null. -
getConfig
Deprecated.Gets client configuration.- Returns:
- non-null client configuration
-
build
Deprecated.Builds an instance ofClickHouseClient. This method will useServiceLoaderto load a suitable implementation based on preferred protocol(s), or just the first one if no preference given.ClickHouseClient.accept(ClickHouseProtocol)will be invoked during the process to test if the implementation is compatible with the preferred protocol(s) or not. At the end of process, if a suitable implementation is found,ClickHouseClient.init(ClickHouseConfig)will be invoked for initialization.- Returns:
- suitable client to handle preferred protocols
- Throws:
IllegalStateException- when no suitable client found in classpath
-
agent
Deprecated.Sets whether agent should be used for advanced feature like failover and retry.- Parameters:
agent- whether to use agent- Returns:
- this builder
-
config
Deprecated.Sets configuration.- Parameters:
config- non-null configuration- Returns:
- this builder
-
option
Deprecated.Adds an option, which is usually an Enum type that implementsClickHouseOption.- Parameters:
option- non-null optionvalue- value- Returns:
- this builder
-
removeOption
Deprecated.Removes an option.- Parameters:
option- non-null option- Returns:
- this builder
-
clearOptions
Deprecated.Removes all options.- Returns:
- this builder
-
options
Deprecated.Sets options.- Parameters:
options- map containing all options- Returns:
- this builder
-
defaultCredentials
Deprecated.Sets default credentials, which will be used to connect to aClickHouseNodeonly when it has no credentials defined.- Parameters:
credentials- default credentials- Returns:
- this builder
-
nodeSelector
Deprecated.Sets node selector.- Parameters:
nodeSelector- non-null node selector- Returns:
- this builder
-
metricRegistry
Deprecated.Sets metric registry.- Parameters:
metricRegistry- metric registry, could be null- Returns:
- this builder
-