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 int
RESPONSE_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 void
channelRead0(io.netty.channel.ChannelHandlerContext ctx, WritableRequest msg)
Please keep in mind that this method will be renamed tomessageReceived(ChannelHandlerContext, I)
in 5.0.void
exceptionCaught(io.netty.channel.ChannelHandlerContext ctx, Throwable cause)
long
getNumberBytesReceived()
void
preSuperStep(MessageStore<OID_T,org.apache.hadoop.io.Writable,GS_VID_T> nextIncomingMessages)
void
resetBytesCounter()
-
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 Exception
Please 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:
channelRead0
in classio.netty.channel.SimpleChannelInboundHandler<WritableRequest>
- Parameters:
ctx
- theChannelHandlerContext
which thisSimpleChannelInboundHandler
belongs 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:
exceptionCaught
in interfaceio.netty.channel.ChannelHandler
- Specified by:
exceptionCaught
in interfaceio.netty.channel.ChannelInboundHandler
- Overrides:
exceptionCaught
in 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()
-
-