Class ClickHouseNodes

java.lang.Object
com.clickhouse.client.ClickHouseNodes
All Implemented Interfaces:
ClickHouseNodeManager, Serializable, Function<ClickHouseNodeSelector,ClickHouseNode>
Direct Known Subclasses:
ClickHouseCluster

@Deprecated public class ClickHouseNodes extends Object implements ClickHouseNodeManager
Deprecated.
A generic node manager for managing one or more nodes which may or may not belong to same cluster. It maintains two lists - one for healthy nodes and the other for faulty ones. Behind the scene, there's background thread(s) for discovering nodes and health check. Besides, ClickHouseLoadBalancingPolicy is used to pickup available node and moving node between lists according to its status.
See Also:
  • Field Details

    • checking

      protected final AtomicBoolean checking
      Deprecated.
      Flag for exclusive health check.
    • index

      protected final AtomicInteger index
      Deprecated.
      Index for retrieving next node.
    • lock

      protected final ReentrantReadWriteLock lock
      Deprecated.
      Lock for read and write nodes and faultyNodes.
    • groupSize

      protected final int groupSize
      Deprecated.
      Maximum number of nodes can be used for operation at a time.
    • nodes

      protected final LinkedList<ClickHouseNode> nodes
      Deprecated.
      List of healthy nodes.
    • faultyNodes

      protected final LinkedList<ClickHouseNode> faultyNodes
      Deprecated.
      List of faulty nodes.
    • discoveryFuture

      protected final AtomicReference<ScheduledFuture<?>> discoveryFuture
      Deprecated.
      Reference holding future of scheduled discovery.
    • healthCheckFuture

      protected final AtomicReference<ScheduledFuture<?>> healthCheckFuture
      Deprecated.
      Reference holding future of scheduled health check.
    • policy

      protected final ClickHouseLoadBalancingPolicy policy
      Deprecated.
      Load balancing policy.
    • selector

      protected final ClickHouseNodeSelector selector
      Deprecated.
      Load balancing tags for filtering out nodes.
    • singleNode

      protected final boolean singleNode
      Deprecated.
      Flag indicating whether it's single node or not.
    • template

      protected final ClickHouseNode template
      Deprecated.
      Template node.
  • Constructor Details

    • ClickHouseNodes

      protected ClickHouseNodes(Collection<ClickHouseNode> nodes, ClickHouseNode template)
      Deprecated.
      Default constructor.
      Parameters:
      nodes - non-empty list of nodes
      template - non-null template node
  • Method Details