接口 ManagedLedgerPayloadProcessor.Processor

封闭接口:
ManagedLedgerPayloadProcessor

public static interface ManagedLedgerPayloadProcessor.Processor
  • 方法概要

    修饰符和类型
    方法
    说明
    io.netty.buffer.ByteBuf
    process(Object contextObj, io.netty.buffer.ByteBuf inputPayload)
    Process the input payload and return a new payload.
    void
    release(io.netty.buffer.ByteBuf processedPayload)
    To release any resource used during the process.
  • 方法详细资料

    • process

      io.netty.buffer.ByteBuf process(Object contextObj, io.netty.buffer.ByteBuf inputPayload)
      Process the input payload and return a new payload. NOTE: If this processor returns a different ByteBuf instance than the passed one DO THE FOLLOWING to avoid memory leaks 1. Call inputPayload.release() to release a reference 2. Call retain() on the ByteBuf that is being returned
      参数:
      contextObj - context object
      inputPayload - The input payload buffer
      返回:
      processed data
    • release

      void release(io.netty.buffer.ByteBuf processedPayload)
      To release any resource used during the process. NOTE: To avoid memory leak, do the following ONLY if a different ByteBuf instance was returned in process() 1. Call processedPayload.release() to release a reference 2. Do any other cleanup needed
      参数:
      processedPayload - The processed payload that was returned in process() call