Package io.netty.channel.uring
Class IoUringDatagramChannel.IoUringDatagramChannelUnsafe
- java.lang.Object
-
- io.netty.channel.AbstractChannel.AbstractUnsafe
-
- io.netty.channel.uring.AbstractIoUringChannel.AbstractUringUnsafe
-
- io.netty.channel.uring.IoUringDatagramChannel.IoUringDatagramChannelUnsafe
-
- All Implemented Interfaces:
Channel.Unsafe,IoHandle,IoUringIoHandle,java.lang.AutoCloseable
- Enclosing class:
- IoUringDatagramChannel
private final class IoUringDatagramChannel.IoUringDatagramChannelUnsafe extends AbstractIoUringChannel.AbstractUringUnsafe
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private classIoUringDatagramChannel.IoUringDatagramChannelUnsafe.WriteProcessor
-
Field Summary
Fields Modifier and Type Field Description private ByteBufreadBufferprivate IoUringDatagramChannel.IoUringDatagramChannelUnsafe.WriteProcessorwriteProcessor
-
Constructor Summary
Constructors Modifier Constructor Description privateIoUringDatagramChannelUnsafe()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) voidconnectComplete(byte op, int res, int flags, long data)Called once a connect was completed.protected voidreadComplete0(byte op, int res, int flags, short data, int outstanding)Called once a read was completed.private booleanremoveFromOutboundBuffer(ChannelOutboundBuffer outboundBuffer, int res, java.lang.String errormsg)protected intscheduleRead0(boolean first, boolean socketIsEmpty)Schedule a read and returns the number ofAbstractIoUringChannel.AbstractUringUnsafe.readComplete(byte, int, int, short)calls that are expected because of the scheduled read.private intscheduleRecvmsg(ByteBuf byteBuf, int numDatagram, int datagramSize)private booleanscheduleRecvmsg0(long bufferAddress, int bufferLength, boolean first, boolean more)private booleanscheduleSendmsg(ByteBuf data, java.net.InetSocketAddress remoteAddress, long bufferAddress, int bufferLength, int segmentSize, boolean first)private booleanscheduleWrite(java.lang.Object msg, boolean first)protected intscheduleWriteMultiple(ChannelOutboundBuffer in)Schedule the write of multiple messages in theChannelOutboundBufferand returns the number ofAbstractIoUringChannel.AbstractUringUnsafe.writeComplete(byte, int, int, long)calls that are expected because of the scheduled write.protected intscheduleWriteSingle(java.lang.Object msg)Schedule the write of a single message and returns the number ofAbstractIoUringChannel.AbstractUringUnsafe.writeComplete(byte, int, int, long)calls that are expected because of the scheduled write.voidunregistered()Called once thisIoHandlewas unregistered and so will not receive any more events viaIoHandle.handle(IoRegistration, IoEvent).(package private) booleanwriteComplete0(byte op, int res, int flags, long data, int outstanding)Called once a write was completed.-
Methods inherited from class io.netty.channel.uring.AbstractIoUringChannel.AbstractUringUnsafe
cancelComplete0, canCloseNow0, close, close, connect, deregister, flush0, handle, isReadMultishot, recvBufAllocHandle, schedulePollIn, scheduleRead, shutdownInput
-
Methods inherited from class io.netty.channel.AbstractChannel.AbstractUnsafe
annotateConnectException, beginRead, bind, close, closeForcibly, closeIfClosed, disconnect, ensureOpen, flush, handleWriteError, localAddress, outboundBuffer, prepareToClose, register, remoteAddress, safeSetFailure, safeSetSuccess, shutdownOutput, voidPromise, write
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.netty.channel.IoHandle
registered
-
-
-
-
Field Detail
-
writeProcessor
private final IoUringDatagramChannel.IoUringDatagramChannelUnsafe.WriteProcessor writeProcessor
-
readBuffer
private ByteBuf readBuffer
-
-
Method Detail
-
readComplete0
protected void readComplete0(byte op, int res, int flags, short data, int outstanding)Description copied from class:AbstractIoUringChannel.AbstractUringUnsafeCalled once a read was completed.- Specified by:
readComplete0in classAbstractIoUringChannel.AbstractUringUnsafe
-
scheduleRead0
protected int scheduleRead0(boolean first, boolean socketIsEmpty)Description copied from class:AbstractIoUringChannel.AbstractUringUnsafeSchedule a read and returns the number ofAbstractIoUringChannel.AbstractUringUnsafe.readComplete(byte, int, int, short)calls that are expected because of the scheduled read.- Specified by:
scheduleRead0in classAbstractIoUringChannel.AbstractUringUnsafe- Parameters:
first-trueif this is the first read of a read loop.socketIsEmpty-trueif the socket is guaranteed to be empty,falseotherwise.- Returns:
- the number of
AbstractIoUringChannel.AbstractUringUnsafe.readComplete(byte, int, int, short)calls expected or-1ifAbstractIoUringChannel.AbstractUringUnsafe.readComplete(byte, int, int, short)is called until the read is cancelled (multi-shot).
-
scheduleRecvmsg
private int scheduleRecvmsg(ByteBuf byteBuf, int numDatagram, int datagramSize)
-
scheduleRecvmsg0
private boolean scheduleRecvmsg0(long bufferAddress, int bufferLength, boolean first, boolean more)
-
writeComplete0
boolean writeComplete0(byte op, int res, int flags, long data, int outstanding)Description copied from class:AbstractIoUringChannel.AbstractUringUnsafeCalled once a write was completed.- Specified by:
writeComplete0in classAbstractIoUringChannel.AbstractUringUnsafe- Parameters:
op- the op coderes- the result.flags- the flags.data- the data that was passed when submitting the op.outstanding- the outstanding write completions.
-
removeFromOutboundBuffer
private boolean removeFromOutboundBuffer(ChannelOutboundBuffer outboundBuffer, int res, java.lang.String errormsg)
-
connectComplete
void connectComplete(byte op, int res, int flags, long data)Description copied from class:AbstractIoUringChannel.AbstractUringUnsafeCalled once a connect was completed.- Overrides:
connectCompletein classAbstractIoUringChannel.AbstractUringUnsafe- Parameters:
op- the op code.res- the result.flags- the flags.data- the data that was passed when submitting the op.
-
scheduleWriteMultiple
protected int scheduleWriteMultiple(ChannelOutboundBuffer in)
Description copied from class:AbstractIoUringChannel.AbstractUringUnsafeSchedule the write of multiple messages in theChannelOutboundBufferand returns the number ofAbstractIoUringChannel.AbstractUringUnsafe.writeComplete(byte, int, int, long)calls that are expected because of the scheduled write.- Specified by:
scheduleWriteMultiplein classAbstractIoUringChannel.AbstractUringUnsafe
-
scheduleWriteSingle
protected int scheduleWriteSingle(java.lang.Object msg)
Description copied from class:AbstractIoUringChannel.AbstractUringUnsafeSchedule the write of a single message and returns the number ofAbstractIoUringChannel.AbstractUringUnsafe.writeComplete(byte, int, int, long)calls that are expected because of the scheduled write.- Specified by:
scheduleWriteSinglein classAbstractIoUringChannel.AbstractUringUnsafe
-
scheduleWrite
private boolean scheduleWrite(java.lang.Object msg, boolean first)
-
scheduleSendmsg
private boolean scheduleSendmsg(ByteBuf data, java.net.InetSocketAddress remoteAddress, long bufferAddress, int bufferLength, int segmentSize, boolean first)
-
unregistered
public void unregistered()
Description copied from interface:IoHandleCalled once thisIoHandlewas unregistered and so will not receive any more events viaIoHandle.handle(IoRegistration, IoEvent).- Specified by:
unregisteredin interfaceIoHandle- Overrides:
unregisteredin classAbstractIoUringChannel.AbstractUringUnsafe
-
-