Interface ManagedLedgerPayloadProcessor.Processor
-
- Enclosing interface:
- ManagedLedgerPayloadProcessor
public static interface ManagedLedgerPayloadProcessor.Processor
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description io.netty.buffer.ByteBufprocess(java.lang.Object contextObj, io.netty.buffer.ByteBuf inputPayload)Process the input payload and return a new payload.voidrelease(io.netty.buffer.ByteBuf processedPayload)To release any resource used during the process.
-
-
-
Method Detail
-
process
io.netty.buffer.ByteBuf process(java.lang.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- Parameters:
contextObj- context objectinputPayload- The input payload buffer- Returns:
- 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- Parameters:
processedPayload- The processed payload that was returned in process() call
-
-