public void setDiscardAfterReads(int discardAfterReads) {
        if (discardAfterReads <= 0) {
            throw new IllegalArgumentException("discardAfterReads must be > 0");
        }
        this.discardAfterReads = discardAfterReads;
    }
Set the number of reads after which {@link ByteBuf#discardSomeReadBytes()} are called and so free up memory.
The default is {@code 16}.
src/main/java/com/alipay/remoting/codec/AbstractBatchDecoder.java