class CFHandle implements AutoCloseable {

        private final ColumnFamilyHandle handle;
        private final AtomicInteger refs;
        private final RocksDBIteratorPool iterPool;

        public CFHandle(RocksDB rocksdb, ColumnFamilyHandle handle) {
            E.checkNotNull(handle, "handle");
            this.handle = handle;
            this.refs = new AtomicInteger(1);
            this.iterPool = new RocksDBIteratorPool(rocksdb, this.handle);
        }

        public synchronized ColumnFamilyHandle get() {
            E.checkState(this.handle.isOwningHandle(), "It seems CF has been closed");
            assert this.refs.get() >= 1;
            return this.handle;
        }

        public synchronized ReusedRocksIterator newIterator() {
            assert this.handle.isOwningHandle();
            assert this.refs.get() >= 1;
            return this.iterPool.newIterator();
        }

        public synchronized void open() {
            this.refs.incrementAndGet();
        }

        @Override
        public void close() {
            if (this.refs.decrementAndGet() <= 0) {
                this.iterPool.close();
                this.handle.close();
            }
        }

        public synchronized ColumnFamilyHandle waitForDrop() {<FILL_FUNCTION_BODY>}

        public synchronized void destroy() {
            this.close();
            assert this.refs.get() == 0 && !this.handle.isOwningHandle();
        }
    }

            assert this.refs.get() >= 1;
            // When entering this method, the refs won't increase anymore
            final long timeout = TimeUnit.MINUTES.toMillis(30L);
            final long unit = 100L;
            for (long i = 1; this.refs.get() > 1; i++) {
                try {
                    Thread.sleep(unit);
                } catch (InterruptedException ignored) {
                    // 30s rest api timeout may cause InterruptedException
                }
                if (i * unit > timeout) {
                    throw new BackendException("Timeout after %sms to drop CF", timeout);
                }
            }
            assert this.refs.get() == 1;
            return this.handle;
        
<no_super_class>