Class PreciseFrameDecoder
- java.lang.Object
-
- io.netty.channel.ChannelHandlerAdapter
-
- io.netty.channel.ChannelInboundHandlerAdapter
-
- io.netty.handler.codec.ByteToMessageDecoder
-
- org.apache.hugegraph.computer.core.network.netty.codec.PreciseFrameDecoder
-
- All Implemented Interfaces:
io.netty.channel.ChannelHandler,io.netty.channel.ChannelInboundHandler
public class PreciseFrameDecoder extends io.netty.handler.codec.ByteToMessageDecoderThePreciseFrameDecoderis a frame Decoder that precisely controls the number of the max bytes per read, the decoder should be chosen when receiving data using zero-copy.
-
-
Constructor Summary
Constructors Constructor Description PreciseFrameDecoder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidchannelActive(io.netty.channel.ChannelHandlerContext ctx)protected io.netty.buffer.ByteBufdecode(io.netty.channel.ChannelHandlerContext ctx, io.netty.buffer.ByteBuf in)protected voiddecode(io.netty.channel.ChannelHandlerContext ctx, io.netty.buffer.ByteBuf in, java.util.List<java.lang.Object> out)-
Methods inherited from class io.netty.handler.codec.ByteToMessageDecoder
actualReadableBytes, callDecode, channelInactive, channelRead, channelReadComplete, decodeLast, discardSomeReadBytes, handlerRemoved, handlerRemoved0, internalBuffer, isSingleDecode, setCumulator, setDiscardAfterReads, setSingleDecode, userEventTriggered
-
Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter
channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught
-
Methods inherited from class io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, handlerAdded, isSharable
-
-
-
-
Method Detail
-
channelActive
public void channelActive(io.netty.channel.ChannelHandlerContext ctx) throws java.lang.Exception- Specified by:
channelActivein interfaceio.netty.channel.ChannelInboundHandler- Overrides:
channelActivein classio.netty.channel.ChannelInboundHandlerAdapter- Throws:
java.lang.Exception
-
decode
protected void decode(io.netty.channel.ChannelHandlerContext ctx, io.netty.buffer.ByteBuf in, java.util.List<java.lang.Object> out) throws java.lang.Exception- Specified by:
decodein classio.netty.handler.codec.ByteToMessageDecoder- Throws:
java.lang.Exception
-
decode
protected io.netty.buffer.ByteBuf decode(io.netty.channel.ChannelHandlerContext ctx, io.netty.buffer.ByteBuf in)
-
-