Class NettyServerHandler<OID_T extends org.apache.hadoop.io.WritableComparable,GS_VID_T>
- java.lang.Object
-
- io.netty.channel.ChannelHandlerAdapter
-
- io.netty.channel.ChannelInboundHandlerAdapter
-
- io.netty.channel.SimpleChannelInboundHandler<WritableRequest>
-
- com.alibaba.graphscope.parallel.netty.handler.NettyServerHandler<OID_T,GS_VID_T>
-
- All Implemented Interfaces:
io.netty.channel.ChannelHandler,io.netty.channel.ChannelInboundHandler
public class NettyServerHandler<OID_T extends org.apache.hadoop.io.WritableComparable,GS_VID_T> extends io.netty.channel.SimpleChannelInboundHandler<WritableRequest>
-
-
Field Summary
Fields Modifier and Type Field Description static intRESPONSE_BYTES
-
Constructor Summary
Constructors Constructor Description NettyServerHandler(IFragment<?,GS_VID_T,?,?> fragment, MessageStore<OID_T,org.apache.hadoop.io.Writable,GS_VID_T> nextIncomingMessages)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidchannelRead0(io.netty.channel.ChannelHandlerContext ctx, WritableRequest msg)Please keep in mind that this method will be renamed tomessageReceived(ChannelHandlerContext, I)in 5.0.voidexceptionCaught(io.netty.channel.ChannelHandlerContext ctx, Throwable cause)longgetNumberBytesReceived()voidpreSuperStep(MessageStore<OID_T,org.apache.hadoop.io.Writable,GS_VID_T> nextIncomingMessages)voidresetBytesCounter()-
Methods inherited from class io.netty.channel.SimpleChannelInboundHandler
acceptInboundMessage, channelRead
-
Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter
channelActive, channelInactive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, userEventTriggered
-
Methods inherited from class io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, handlerAdded, handlerRemoved, isSharable
-
-
-
-
Constructor Detail
-
NettyServerHandler
public NettyServerHandler(IFragment<?,GS_VID_T,?,?> fragment, MessageStore<OID_T,org.apache.hadoop.io.Writable,GS_VID_T> nextIncomingMessages)
-
-
Method Detail
-
channelRead0
protected void channelRead0(io.netty.channel.ChannelHandlerContext ctx, WritableRequest msg) throws ExceptionPlease keep in mind that this method will be renamed tomessageReceived(ChannelHandlerContext, I)in 5.0.Is called for each message of type
WritableRequest.- Specified by:
channelRead0in classio.netty.channel.SimpleChannelInboundHandler<WritableRequest>- Parameters:
ctx- theChannelHandlerContextwhich thisSimpleChannelInboundHandlerbelongs tomsg- the message to handle- Throws:
Exception- is thrown if an error occurred
-
exceptionCaught
public void exceptionCaught(io.netty.channel.ChannelHandlerContext ctx, Throwable cause)- Specified by:
exceptionCaughtin interfaceio.netty.channel.ChannelHandler- Specified by:
exceptionCaughtin interfaceio.netty.channel.ChannelInboundHandler- Overrides:
exceptionCaughtin classio.netty.channel.ChannelInboundHandlerAdapter
-
preSuperStep
public void preSuperStep(MessageStore<OID_T,org.apache.hadoop.io.Writable,GS_VID_T> nextIncomingMessages)
-
getNumberBytesReceived
public long getNumberBytesReceived()
-
resetBytesCounter
public void resetBytesCounter()
-
-