@NotThreadSafe public final class BlockReadHandler extends io.netty.channel.ChannelInboundHandlerAdapter
AbstractReadHandler
.Modifier and Type | Class and Description |
---|---|
class |
BlockReadHandler.BlockPacketReader
The packet reader to read from a local block worker.
|
Constructor and Description |
---|
BlockReadHandler(ExecutorService executorService,
BlockWorker blockWorker,
alluxio.worker.netty.FileTransferType fileTransferType)
Creates an instance of
AbstractReadHandler . |
Modifier and Type | Method and Description |
---|---|
protected boolean |
acceptMessage(Object object)
Checks whether this object should be processed by this handler.
|
void |
channelRead(io.netty.channel.ChannelHandlerContext ctx,
Object object) |
void |
channelUnregistered(io.netty.channel.ChannelHandlerContext ctx) |
protected alluxio.worker.netty.AbstractReadHandler.PacketReader |
createPacketReader(BlockReadRequestContext context,
io.netty.channel.Channel channel)
Creates a read reader.
|
protected BlockReadRequestContext |
createRequestContext(Protocol.ReadRequest request) |
void |
exceptionCaught(io.netty.channel.ChannelHandlerContext ctx,
Throwable cause) |
boolean |
tooManyPendingPackets() |
channelActive, channelInactive, channelReadComplete, channelRegistered, channelWritabilityChanged, userEventTriggered
ensureNotSharable, handlerAdded, handlerRemoved, isSharable
public BlockReadHandler(ExecutorService executorService, BlockWorker blockWorker, alluxio.worker.netty.FileTransferType fileTransferType)
AbstractReadHandler
.executorService
- the executor service to run PacketReader
sblockWorker
- the block workerfileTransferType
- the file transfer typeprotected BlockReadRequestContext createRequestContext(Protocol.ReadRequest request)
request
- the block read requestprotected alluxio.worker.netty.AbstractReadHandler.PacketReader createPacketReader(BlockReadRequestContext context, io.netty.channel.Channel channel)
context
- read request contextchannel
- channelpublic void channelUnregistered(io.netty.channel.ChannelHandlerContext ctx)
channelUnregistered
in interface io.netty.channel.ChannelInboundHandler
channelUnregistered
in class io.netty.channel.ChannelInboundHandlerAdapter
public void channelRead(io.netty.channel.ChannelHandlerContext ctx, Object object) throws Exception
channelRead
in interface io.netty.channel.ChannelInboundHandler
channelRead
in class io.netty.channel.ChannelInboundHandlerAdapter
Exception
public void exceptionCaught(io.netty.channel.ChannelHandlerContext ctx, Throwable cause)
exceptionCaught
in interface io.netty.channel.ChannelHandler
exceptionCaught
in interface io.netty.channel.ChannelInboundHandler
exceptionCaught
in class io.netty.channel.ChannelInboundHandlerAdapter
public boolean tooManyPendingPackets()
protected boolean acceptMessage(Object object)
object
- the objectCopyright © 2023. All Rights Reserved.