public void clear() {
        this.writeDataStartPos = -1;
        this.writeIndexStartPos = -1;
        this.cacheDataOffset.set(0);
        this.cacheIndexOffset.set(0);
        this.curMessageCount.set(0);
        this.queuesMap.clear();
        this.keysMap.clear();
        this.cacheDataSegment.rewind();
        this.cachedIndexSegment.rewind();
        this.leftAppendTime.set(System.currentTimeMillis());
        this.rightAppendTime.set(System.currentTimeMillis());
    }
Batch flush memory data to disk.

@param msgFileStore    the file storage
@param strBuffer       the message buffer
@throws IOException    the exception during processing
inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/broker/msgstore/mem/MsgMemStore.java