public synchronized void onSuccess() {
    batchReqs.clear();

    events.clear();
    requestCommitIds.clear();

    firstEventProcessingTime = Long.MIN_VALUE;

    totalBufferSize = 0;
  }
Try offer {@link Event} into cache if the given {@link Event} is not duplicated.

@param event the given {@link Event}
@return {@link true} if the batch can be transferred
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/connector/protocol/pipeconsensus/payload/builder/PipeConsensusTransferBatchReqBuilder.java