@NotThreadSafe public final class UfsFileWriteHandler extends io.netty.channel.ChannelInboundHandlerAdapter
AbstractWriteHandler
.
For more information about the implementation of the client side writer, see
UnderFileSystemFileOutStream.Modifier and Type | Class and Description |
---|---|
class |
UfsFileWriteHandler.UfsFilePacketWriter
The packet writer that writes to UFS.
|
Constructor and Description |
---|
UfsFileWriteHandler(ExecutorService executorService,
UfsManager ufsManager)
Creates an instance of
UfsFileWriteHandler . |
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(UfsFileWriteRequestContext context,
io.netty.channel.Channel channel)
Creates a read writer.
|
protected UfsFileWriteRequestContext |
createRequestContext(Protocol.WriteRequest msg)
Creates a new request context.
|
void |
exceptionCaught(io.netty.channel.ChannelHandlerContext ctx,
Throwable cause) |
protected void |
initRequestContext(UfsFileWriteRequestContext context)
Initializes the given request context.
|
channelActive, channelInactive, channelReadComplete, channelRegistered, channelWritabilityChanged, userEventTriggered
ensureNotSharable, handlerAdded, handlerRemoved, isSharable
public UfsFileWriteHandler(ExecutorService executorService, UfsManager ufsManager)
UfsFileWriteHandler
.executorService
- the executor service to run PacketWriter
sufsManager
- the file data managerprotected boolean acceptMessage(Object object)
object
- the objectprotected UfsFileWriteRequestContext createRequestContext(Protocol.WriteRequest msg)
msg
- the block write requestprotected void initRequestContext(UfsFileWriteRequestContext context)
context
- the created request contextprotected alluxio.worker.netty.AbstractWriteHandler.PacketWriter createPacketWriter(UfsFileWriteRequestContext context, io.netty.channel.Channel channel)
context
- read request contextchannel
- channelpublic 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.