Class AbstractIoUringStreamChannel.IoUringStreamUnsafe
java.lang.Object
io.netty.channel.AbstractChannel.AbstractUnsafe
io.netty.channel.uring.AbstractIoUringChannel.AbstractUringUnsafe
io.netty.channel.uring.AbstractIoUringStreamChannel.IoUringStreamUnsafe
- All Implemented Interfaces:
Channel.Unsafe, IoHandle, IoUringIoHandle, AutoCloseable
- Direct Known Subclasses:
IoUringDomainSocketChannel.IoUringDomainSocketUnsafe, IoUringSocketChannel.IoUringSocketUnsafe
- Enclosing class:
AbstractIoUringStreamChannel
protected class AbstractIoUringStreamChannel.IoUringStreamUnsafe
extends AbstractIoUringChannel.AbstractUringUnsafe
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate intcalculateRecvFlags(boolean first) private shortcalculateRecvIoPrio(boolean first, boolean socketIsEmpty) protected ChannelOutboundBuffer.MessageProcessorfilterWriteMultiple(IovArrayReferenceCollector collector) protected final voidhandleReadException(ChannelPipeline pipeline, ByteBuf byteBuf, Throwable cause, boolean allDataRead, IoUringRecvByteAllocatorHandle allocHandle) private booleanhandleWriteCompleteFileRegion(ChannelOutboundBuffer channelOutboundBuffer, IoUringFileRegion fileRegion, int res, short data) private booleanhandleWriteCompleteGenericFileRegion(ChannelOutboundBuffer channelOutboundBuffer, FileRegion region, int res) protected voidreadComplete0(byte op, int res, int flags, short data, int outstanding) Called once a read was completed.private voidprivate voidscheduleNextRead(ChannelPipeline pipeline, IoUringRecvByteAllocatorHandle allocHandle, boolean rearm, boolean completeRead) 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 intscheduleReadProviderBuffer(IoUringBufferRing bufferRing, boolean first, boolean socketIsEmpty) private intscheduleWriteFileRegion(int fd, IoRegistration registration, FileRegion region) protected intSchedule 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 intSchedule 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.voidCalled 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 AbstractIoUringChannel.AbstractUringUnsafe
cancelComplete0, canCloseNow0, close, close, connect, connectComplete, deregister, flush0, handle, isReadMultishot, recvBufAllocHandle, schedulePollIn, scheduleRead, shutdownInputMethods inherited from class AbstractChannel.AbstractUnsafe
annotateConnectException, beginRead, bind, close, closeForcibly, closeIfClosed, disconnect, ensureOpen, flush, handleWriteError, localAddress, outboundBuffer, prepareToClose, register, remoteAddress, safeSetFailure, safeSetSuccess, shutdownOutput, voidPromise, writeMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface IoHandle
registered
-
Field Details
-
readBuffer
-
fileRegionChunkBuf
-
-
Constructor Details
-
IoUringStreamUnsafe
protected IoUringStreamUnsafe()
-
-
Method Details
-
scheduleWriteMultiple
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
-
filterWriteMultiple
protected ChannelOutboundBuffer.MessageProcessor filterWriteMultiple(IovArrayReferenceCollector collector) -
scheduleWriteSingle
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
-
scheduleWriteFileRegion
-
calculateRecvFlags
private int calculateRecvFlags(boolean first) -
calculateRecvIoPrio
private short calculateRecvIoPrio(boolean first, boolean socketIsEmpty) -
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).
-
scheduleReadProviderBuffer
private int scheduleReadProviderBuffer(IoUringBufferRing bufferRing, boolean first, boolean socketIsEmpty) -
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
-
scheduleNextRead
private void scheduleNextRead(ChannelPipeline pipeline, IoUringRecvByteAllocatorHandle allocHandle, boolean rearm, boolean completeRead) -
handleReadException
protected final void handleReadException(ChannelPipeline pipeline, ByteBuf byteBuf, Throwable cause, boolean allDataRead, IoUringRecvByteAllocatorHandle allocHandle) -
handleWriteCompleteFileRegion
private boolean handleWriteCompleteFileRegion(ChannelOutboundBuffer channelOutboundBuffer, IoUringFileRegion fileRegion, int res, short data) -
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.
-
handleWriteCompleteGenericFileRegion
private boolean handleWriteCompleteGenericFileRegion(ChannelOutboundBuffer channelOutboundBuffer, FileRegion region, int res) -
releaseFileRegionChunkBuf
private void releaseFileRegionChunkBuf() -
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
-