public void close() {
        this.lock.lock();
        this.closed = true;
        try {
            for (Condition waiter : this.waiters)
                waiter.signal();
        } finally {
            this.lock.unlock();
        }
    }
Closes the buffer pool. Memory will be prevented from being allocated, but may be deallocated. All allocations
awaiting available memory will be notified to abort.
clients/src/main/java/org/apache/kafka/clients/producer/internals/BufferPool.java