boolean changeClient(ClickHouseClient currentClient, ClickHouseClient newClient) {
            final boolean changed = client.compareAndSet(currentClient, newClient);
            try {
                if (changed) {
                    currentClient.close();
                } else {
                    newClient.close();
                }
            } catch (Exception e) {
                // ignore
            }
            return changed;
        }
Thread-safe wrapper of {@link ClickHouseClient} for collecting metrics and
fail-over.
clickhouse-client/src/main/java/com/clickhouse/client/ClickHouseClientBuilder.java