R - Request typepublic abstract class RequestServerHandler<R>
extends io.netty.channel.ChannelInboundHandlerAdapter
| Modifier and Type | Class and Description |
|---|---|
static interface |
RequestServerHandler.Factory
Factory for
RequestServerHandler |
| Modifier and Type | Field and Description |
|---|---|
protected FlowControl |
flowControl
Flow control used in sending requests
|
static int |
RESPONSE_BYTES
Number of bytes in the encoded response
|
| Constructor and Description |
|---|
RequestServerHandler(WorkerRequestReservedMap workerRequestReservedMap,
ImmutableClassesGiraphConfiguration conf,
TaskInfo myTaskInfo,
Thread.UncaughtExceptionHandler exceptionHandler)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
channelActive(io.netty.channel.ChannelHandlerContext ctx) |
void |
channelInactive(io.netty.channel.ChannelHandlerContext ctx) |
void |
channelRead(io.netty.channel.ChannelHandlerContext ctx,
Object msg) |
void |
exceptionCaught(io.netty.channel.ChannelHandlerContext ctx,
Throwable cause) |
abstract void |
processRequest(R request)
Process request
|
channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, userEventTriggeredensureNotSharable, handlerAdded, handlerRemoved, isSharablepublic static final int RESPONSE_BYTES
protected FlowControl flowControl
public RequestServerHandler(WorkerRequestReservedMap workerRequestReservedMap, ImmutableClassesGiraphConfiguration conf, TaskInfo myTaskInfo, Thread.UncaughtExceptionHandler exceptionHandler)
workerRequestReservedMap - Worker request reservation mapconf - ConfigurationmyTaskInfo - Current task infoexceptionHandler - Handles uncaught exceptionspublic void channelRead(io.netty.channel.ChannelHandlerContext ctx,
Object msg)
throws Exception
channelRead in interface io.netty.channel.ChannelInboundHandlerchannelRead in class io.netty.channel.ChannelInboundHandlerAdapterExceptionpublic abstract void processRequest(R request)
request - Request to processpublic void channelActive(io.netty.channel.ChannelHandlerContext ctx)
throws Exception
channelActive in interface io.netty.channel.ChannelInboundHandlerchannelActive in class io.netty.channel.ChannelInboundHandlerAdapterExceptionpublic void channelInactive(io.netty.channel.ChannelHandlerContext ctx)
throws Exception
channelInactive in interface io.netty.channel.ChannelInboundHandlerchannelInactive in class io.netty.channel.ChannelInboundHandlerAdapterExceptionpublic void exceptionCaught(io.netty.channel.ChannelHandlerContext ctx,
Throwable cause)
throws Exception
exceptionCaught in interface io.netty.channel.ChannelHandlerexceptionCaught in interface io.netty.channel.ChannelInboundHandlerexceptionCaught in class io.netty.channel.ChannelInboundHandlerAdapterExceptionCopyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.