@Override
    public boolean recycle() {
        if (this.buffer != null) {
            if (this.buffer.capacity() > MAX_CAPACITY_TO_RECYCLE) {
                // If the size is too large, we should release it to avoid memory overhead
                this.buffer = null;
            } else {
                BufferUtils.clear(this.buffer);
            }
        }
        return recyclers.recycle(this, handle);
    }
A byte buffer collector that will expand automatically.

@author dennis
jraft-core/src/main/java/com/alipay/sofa/jraft/util/ByteBufferCollector.java