@Override
        protected ClickHouseNode get(ClickHouseNodes manager, ClickHouseNodeSelector t) {
            boolean noSelector = t == null || t == ClickHouseNodeSelector.EMPTY;
            int idx = manager.index.getAndUpdate(v -> v + 1 >= manager.nodes.size() ? 0 : v + 1);
            int i = 0;
            ClickHouseNode node = null;
            for (ClickHouseNode n : manager.nodes) {
                if (noSelector || t.match(n)) {
                    node = n;
                }
                if (i++ >= idx && node != null) {
                    break;
                }
            }
            if (node == null) {
                throw new IllegalArgumentException(ClickHouseUtils.format(ERROR_NO_SUITABLE_NODE, manager, t));
            }
            return node;
        }
Load balancing policy. In general, a policy is responsible for 3 things: 1)
get node from a managed list; 2) managing node's status; and 3) optionally
schedule background tasks like node discovery and health check.
clickhouse-client/src/main/java/com/clickhouse/client/ClickHouseLoadBalancingPolicy.java