public class FileWriteHandler.BlockPacketWriter extends Object
Constructor and Description |
---|
BlockPacketWriter(BlockWriteRequestContext context,
io.netty.channel.Channel channel,
DoraWorker worker) |
Modifier and Type | Method and Description |
---|---|
protected void |
cancelRequest(BlockWriteRequestContext context)
Cancels this write.
|
protected void |
cleanupRequest(BlockWriteRequestContext context)
Cleans up this write.
|
protected void |
completeRequest(BlockWriteRequestContext context,
io.netty.channel.Channel channel)
Completes this write.
|
protected void |
writeBuf(BlockWriteRequestContext context,
io.netty.channel.Channel channel,
io.netty.buffer.ByteBuf buf,
long pos)
Writes the buffer.
|
public BlockPacketWriter(BlockWriteRequestContext context, io.netty.channel.Channel channel, DoraWorker worker)
context
- context of this packet writerchannel
- netty channelworker
- local block workerprotected void completeRequest(BlockWriteRequestContext context, io.netty.channel.Channel channel) throws Exception
context
- context of the request to completechannel
- netty channelException
protected void cancelRequest(BlockWriteRequestContext context) throws Exception
context
- context of the request to completeException
protected void cleanupRequest(BlockWriteRequestContext context) throws Exception
context
- context of the request to completeException
protected void writeBuf(BlockWriteRequestContext context, io.netty.channel.Channel channel, io.netty.buffer.ByteBuf buf, long pos) throws Exception
context
- context of the request to completechannel
- the netty channelbuf
- the bufferpos
- the posException
Copyright © 2023. All Rights Reserved.