presto-cassandra/src/main/java/io/prestosql/plugin/cassandra/ReopeningCluster.java/ReopeningCluster/delegate
class ReopeningCluster:    @Override
    protected synchronized Cluster delegate()
    {
        checkState(!closed, "Cluster has been closed");

        if (delegate == null) {
            delegate = supplier.get();
        }

        if (delegate.isClosed()) {
            log.warn("Cluster has been closed internally");
            delegate = supplier.get();
        }

        verify(!delegate.isClosed(), "Newly created cluster has been immediately closed");

        return delegate;
    }