@NotThreadSafe public class FileWriteHandler extends io.netty.channel.ChannelInboundHandlerAdapter
AbstractWriteHandler
.Modifier and Type | Class and Description |
---|---|
class |
FileWriteHandler.BlockPacketWriter
The packet writer that writes to a local block worker.
|
Modifier | Constructor and Description |
---|---|
protected |
FileWriteHandler(ExecutorService executorService,
DoraWorker doraWorker)
Creates an instance of
FileWriteHandler . |
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.AbstractWriteHandler.PacketWriter |
createPacketWriter(BlockWriteRequestContext context,
io.netty.channel.Channel channel)
Creates a read writer.
|
protected BlockWriteRequestContext |
createRequestContext(Protocol.WriteRequest msg)
Creates a new request context.
|
void |
exceptionCaught(io.netty.channel.ChannelHandlerContext ctx,
Throwable cause) |
protected DoraWorker |
getWorker() |
protected void |
initRequestContext(BlockWriteRequestContext context)
Initializes the given request context.
|
channelActive, channelInactive, channelReadComplete, channelRegistered, channelWritabilityChanged, userEventTriggered
ensureNotSharable, handlerAdded, handlerRemoved, isSharable
protected FileWriteHandler(ExecutorService executorService, DoraWorker doraWorker)
FileWriteHandler
.executorService
- the executor service to run PacketWriter
sdoraWorker
- the dora workerprotected boolean acceptMessage(Object object)
object
- the objectprotected alluxio.worker.netty.AbstractWriteHandler.PacketWriter createPacketWriter(BlockWriteRequestContext context, io.netty.channel.Channel channel)
context
- read request contextchannel
- channelprotected BlockWriteRequestContext createRequestContext(Protocol.WriteRequest msg)
msg
- the block write requestprotected void initRequestContext(BlockWriteRequestContext context) throws Exception
context
- the created request contextException
protected DoraWorker getWorker()
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 void channelUnregistered(io.netty.channel.ChannelHandlerContext ctx)
channelUnregistered
in interface io.netty.channel.ChannelInboundHandler
channelUnregistered
in class io.netty.channel.ChannelInboundHandlerAdapter
Copyright © 2023. All Rights Reserved.