protected void update(ClickHouseNodes manager, ClickHouseNode node, Status status) {
        switch (status) {
            case MANAGED:
                node.setManager(manager);
                if (!manager.nodes.contains(node) && !manager.faultyNodes.contains(node)) {
                    if (node.getProtocol() == ClickHouseProtocol.ANY) {
                        manager.faultyNodes.add(node);
                    } else {
                        manager.nodes.add(node);
                    }
                }
                break;
            case HEALTHY:
                manager.faultyNodes.remove(node);
                if (!manager.nodes.contains(node)) {
                    manager.nodes.add(node);
                }
                break;
            case FAULTY:
                manager.nodes.remove(node);
                if (!manager.faultyNodes.contains(node)) {
                    manager.faultyNodes.add(node);
                    // in case scheduled check was stopped(e.g. aborted or no faulty node)
                    manager.scheduleHealthCheck();
                }
                break;
            case STANDALONE:
                boolean removed = manager.nodes.remove(node);
                removed = manager.faultyNodes.remove(node) || removed;
                if (removed) {
                    node.setManager(null);
                }
                break;
            default:
                break;
        }
    }
Updates node status to one of {@link ClickHouseNode.Status}.

@param manager non-null node manager
@param node    non-null node to update
@param status  non-null status of the node
clickhouse-client/src/main/java/com/clickhouse/client/ClickHouseLoadBalancingPolicy.java