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, userEventTriggered
ensureNotSharable, handlerAdded, handlerRemoved, isSharable
public 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.ChannelInboundHandler
channelRead
in class io.netty.channel.ChannelInboundHandlerAdapter
Exception
public abstract void processRequest(R request)
request
- Request to processpublic void channelActive(io.netty.channel.ChannelHandlerContext ctx) throws Exception
channelActive
in interface io.netty.channel.ChannelInboundHandler
channelActive
in class io.netty.channel.ChannelInboundHandlerAdapter
Exception
public void channelInactive(io.netty.channel.ChannelHandlerContext ctx) throws Exception
channelInactive
in interface io.netty.channel.ChannelInboundHandler
channelInactive
in class io.netty.channel.ChannelInboundHandlerAdapter
Exception
public void exceptionCaught(io.netty.channel.ChannelHandlerContext ctx, Throwable cause) throws Exception
exceptionCaught
in interface io.netty.channel.ChannelHandler
exceptionCaught
in interface io.netty.channel.ChannelInboundHandler
exceptionCaught
in class io.netty.channel.ChannelInboundHandlerAdapter
Exception
Copyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.