@Override
        public ByteBuffer get(int minCapacity) {
            if (cachedBuffer != null && cachedBuffer.capacity() >= minCapacity) {
                ByteBuffer res = cachedBuffer;
                cachedBuffer = null;
                return res;
            } else {
                cachedBuffer = null;
                return ByteBuffer.allocate(minCapacity);
            }
        }
Simple buffer supplier for single-threaded usage. It caches a single buffer, which grows
monotonically as needed to fulfill the allocation request.
clients/src/main/java/org/apache/kafka/common/utils/BufferSupplier.java