Package com.clickhouse.client
Class ClickHouseNodeSelector
java.lang.Object
com.clickhouse.client.ClickHouseNodeSelector
- All Implemented Interfaces:
Serializable
Deprecated.
This class maintains two immutable collections: preferred protocols and tags.
Usually it will be used in two scenarios: 1) find suitable
ClickHouseClient according to preferred protocol(s); and 2) pick
suitable ClickHouseNode to connect to.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ClickHouseNodeSelectorDeprecated.Empty node selector matches all clients and nodes. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedClickHouseNodeSelector(Collection<ClickHouseProtocol> protocols, Collection<String> tags) Deprecated.Default constructor. -
Method Summary
Modifier and TypeMethodDescriptionbooleanDeprecated.Deprecated.Gets preferred protocols.Deprecated.Gets preferred tags.inthashCode()Deprecated.booleanmatch(ClickHouseClient client) Deprecated.Test if the given client supports any ofgetPreferredProtocols().booleanmatch(ClickHouseNode node) Deprecated.Checks if the given node matches any of preferred protocols and tags.booleanDeprecated.Checks if the preferred tags contain all of given tags.booleanDeprecated.Checks if the given protocol matches any of the preferred protocols.booleanDeprecated.Checks if the preferred tags contain any of given tags.static ClickHouseNodeSelectorof(ClickHouseProtocol protocol, ClickHouseProtocol... more) Deprecated.Creates a node selector by specifying preferred protocols.static ClickHouseNodeSelectorDeprecated.Creates a node selector by specifying preferred tags.static ClickHouseNodeSelectorof(Collection<ClickHouseProtocol> protocols, Collection<String> tags) Deprecated.Creates a node selector by specifying preferred protocols and tags.toString()Deprecated.
-
Field Details
-
EMPTY
Deprecated.Empty node selector matches all clients and nodes.
-
-
Constructor Details
-
ClickHouseNodeSelector
Deprecated.Default constructor.- Parameters:
protocols- preferred protocolstags- preferred tags
-
-
Method Details
-
of
Deprecated.Creates a node selector by specifying preferred protocols.- Parameters:
protocol- preferred protocolmore- more protocols- Returns:
- non-null node selector
-
of
Deprecated.Creates a node selector by specifying preferred tags.- Parameters:
tag- preferred tagmore- more tags- Returns:
- non-null selector
-
of
public static ClickHouseNodeSelector of(Collection<ClickHouseProtocol> protocols, Collection<String> tags) Deprecated.Creates a node selector by specifying preferred protocols and tags.- Parameters:
protocols- preferred protocolstags- preferred tags- Returns:
- non-null selector
-
getPreferredProtocols
Deprecated.Gets preferred protocols. Empty list means all.- Returns:
- non-null preferred protocols
-
getPreferredTags
Deprecated.Gets preferred tags. Empty set means all.- Returns:
- non-null preferred tags
-
match
Deprecated.Test if the given client supports any ofgetPreferredProtocols(). It's alwaysfalseif either the client is null or there's no preferred protocol.- Parameters:
client- client to test- Returns:
- true if any of the preferred protocols is supported by the client
-
match
Deprecated.Checks if the given node matches any of preferred protocols and tags.- Parameters:
node- node to check- Returns:
- true if the node matches at least one of preferred protocols and tags; false otherwise
-
matchAnyOfPreferredProtocols
Deprecated.Checks if the given protocol matches any of the preferred protocols.- Parameters:
protocol- protocol to check- Returns:
- true if the protocol matches at least one of preferred protocols; false otherwise
-
matchAllPreferredTags
Deprecated.Checks if the preferred tags contain all of given tags.- Parameters:
tags- tags to check- Returns:
- true if the preferred tags contain all of given tags; false otherwise
-
matchAnyOfPreferredTags
Deprecated.Checks if the preferred tags contain any of given tags.- Parameters:
tags- tags to check- Returns:
- true if the preferred tags contain any of given tags; false otherwise
-
hashCode
public int hashCode()Deprecated. -
equals
Deprecated. -
toString
Deprecated.
-