Package io.netty.incubator.channel.uring
Class AbstractIOUringChannel
- java.lang.Object
-
- io.netty.util.DefaultAttributeMap
-
- io.netty.channel.AbstractChannel
-
- io.netty.incubator.channel.uring.AbstractIOUringChannel
-
- All Implemented Interfaces:
io.netty.channel.Channel,io.netty.channel.ChannelOutboundInvoker,io.netty.channel.unix.UnixChannel,io.netty.util.AttributeMap,java.lang.Comparable<io.netty.channel.Channel>
- Direct Known Subclasses:
AbstractIOUringServerChannel,AbstractIOUringStreamChannel,IOUringDatagramChannel
abstract class AbstractIOUringChannel extends io.netty.channel.AbstractChannel implements io.netty.channel.unix.UnixChannel
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) classAbstractIOUringChannel.AbstractUringUnsafe
-
Field Summary
Fields Modifier and Type Field Description protected booleanactiveprivate static intCONNECT_SCHEDULEDprivate io.netty.channel.ChannelPromiseconnectPromiseThe future of the current connection attempt.private java.util.concurrent.ScheduledFuture<?>connectTimeoutFutureprivate io.netty.channel.ChannelPromisedelayedCloseprivate booleaninputClosedSeenErrorOnReadprivate byteioStateprivate java.net.SocketAddresslocalprivate static io.netty.util.internal.logging.InternalLoggerloggerprivate static io.netty.channel.ChannelMetadataMETADATAprivate MsgHdrMemoryArraymsgHdrMemoryArrayprivate shortnumOutstandingReadsprivate shortnumOutstandingWritesprivate static intPOLL_IN_SCHEDULEDprivate static intPOLL_OUT_SCHEDULEDprivate static intPOLL_RDHUP_SCHEDULEDprivate static intREAD_SCHEDULEDprivate java.net.SocketAddressremoteprivate java.nio.ByteBufferremoteAddressMemoryprivate java.net.SocketAddressrequestedRemoteAddress(package private) LinuxSocketsocketprivate IOUringSubmissionQueuesubmissionQueueprivate static intWRITE_SCHEDULED
-
Constructor Summary
Constructors Constructor Description AbstractIOUringChannel(io.netty.channel.Channel parent, LinuxSocket socket)AbstractIOUringChannel(io.netty.channel.Channel parent, LinuxSocket socket, boolean active)AbstractIOUringChannel(io.netty.channel.Channel parent, LinuxSocket fd, java.net.SocketAddress remote)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description private voidcancelConnectTimeoutFuture()protected static voidcheckResolvable(java.net.InetSocketAddress addr)voidclearPollFlag(int pollMask)private voidcomputeRemote()protected voiddoBeginRead()protected voiddoBind(java.net.SocketAddress local)protected voiddoClose()protected voiddoDeregister()protected voiddoDisconnect()protected voiddoRegister()protected voiddoWrite(io.netty.channel.ChannelOutboundBuffer in)io.netty.channel.unix.FileDescriptorfd()protected java.lang.ObjectfilterOutboundMessage(java.lang.Object msg)private voidfreeMsgHdrArray()private voidfreeRemoteAddressMemory()(package private) booleanioScheduled()(package private) AbstractIOUringChannel.AbstractUringUnsafeioUringUnsafe()booleanisActive()private static booleanisAllowHalfClosure(io.netty.channel.ChannelConfig config)protected booleanisCompatible(io.netty.channel.EventLoop loop)booleanisOpen()protected java.net.SocketAddresslocalAddress0()io.netty.channel.ChannelMetadatametadata()protected io.netty.buffer.ByteBufnewDirectBuffer(io.netty.buffer.ByteBuf buf)protected io.netty.buffer.ByteBufnewDirectBuffer(java.lang.Object holder, io.netty.buffer.ByteBuf buf)private static io.netty.buffer.ByteBufnewDirectBuffer0(java.lang.Object holder, io.netty.buffer.ByteBuf buf, io.netty.buffer.ByteBufAllocator alloc, int capacity)protected abstract AbstractIOUringChannel.AbstractUringUnsafenewUnsafe()protected java.net.SocketAddressremoteAddress0()(package private) voidresetCachedAddresses()private voidschedulePollOut()(package private) voidschedulePollRdHup()private intscheduleWrite(io.netty.channel.ChannelOutboundBuffer in)private booleanshouldBreakIoUringInReady(io.netty.channel.ChannelConfig config)(package private) IOUringSubmissionQueuesubmissionQueue()private voidsubmitConnect(java.net.InetSocketAddress inetSocketAddress)-
Methods inherited from class io.netty.channel.AbstractChannel
alloc, bind, bind, bytesBeforeUnwritable, bytesBeforeWritable, close, close, closeFuture, compareTo, connect, connect, connect, connect, deregister, deregister, disconnect, disconnect, doShutdownOutput, equals, eventLoop, flush, hashCode, id, invalidateLocalAddress, invalidateRemoteAddress, isRegistered, isWritable, localAddress, maxMessagesPerWrite, newChannelPipeline, newFailedFuture, newId, newProgressivePromise, newPromise, newSucceededFuture, parent, pipeline, read, remoteAddress, toString, unsafe, validateFileRegion, voidPromise, write, write, writeAndFlush, writeAndFlush
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface io.netty.channel.Channel
alloc, bytesBeforeUnwritable, bytesBeforeWritable, closeFuture, config, eventLoop, flush, id, isRegistered, isWritable, localAddress, parent, pipeline, read, remoteAddress, unsafe
-
Methods inherited from interface io.netty.channel.ChannelOutboundInvoker
bind, bind, close, close, connect, connect, connect, connect, deregister, deregister, disconnect, disconnect, newFailedFuture, newProgressivePromise, newPromise, newSucceededFuture, voidPromise, write, write, writeAndFlush, writeAndFlush
-
-
-
-
Field Detail
-
logger
private static final io.netty.util.internal.logging.InternalLogger logger
-
METADATA
private static final io.netty.channel.ChannelMetadata METADATA
-
socket
final LinuxSocket socket
-
active
protected volatile boolean active
-
POLL_IN_SCHEDULED
private static final int POLL_IN_SCHEDULED
- See Also:
- Constant Field Values
-
POLL_OUT_SCHEDULED
private static final int POLL_OUT_SCHEDULED
- See Also:
- Constant Field Values
-
POLL_RDHUP_SCHEDULED
private static final int POLL_RDHUP_SCHEDULED
- See Also:
- Constant Field Values
-
WRITE_SCHEDULED
private static final int WRITE_SCHEDULED
- See Also:
- Constant Field Values
-
READ_SCHEDULED
private static final int READ_SCHEDULED
- See Also:
- Constant Field Values
-
CONNECT_SCHEDULED
private static final int CONNECT_SCHEDULED
- See Also:
- Constant Field Values
-
ioState
private byte ioState
-
numOutstandingWrites
private short numOutstandingWrites
-
numOutstandingReads
private short numOutstandingReads
-
delayedClose
private io.netty.channel.ChannelPromise delayedClose
-
inputClosedSeenErrorOnRead
private boolean inputClosedSeenErrorOnRead
-
connectPromise
private io.netty.channel.ChannelPromise connectPromise
The future of the current connection attempt. If not null, subsequent connection attempts will fail.
-
connectTimeoutFuture
private java.util.concurrent.ScheduledFuture<?> connectTimeoutFuture
-
requestedRemoteAddress
private java.net.SocketAddress requestedRemoteAddress
-
remoteAddressMemory
private java.nio.ByteBuffer remoteAddressMemory
-
msgHdrMemoryArray
private MsgHdrMemoryArray msgHdrMemoryArray
-
submissionQueue
private IOUringSubmissionQueue submissionQueue
-
local
private volatile java.net.SocketAddress local
-
remote
private volatile java.net.SocketAddress remote
-
-
Constructor Detail
-
AbstractIOUringChannel
AbstractIOUringChannel(io.netty.channel.Channel parent, LinuxSocket socket)
-
AbstractIOUringChannel
AbstractIOUringChannel(io.netty.channel.Channel parent, LinuxSocket socket, boolean active)
-
AbstractIOUringChannel
AbstractIOUringChannel(io.netty.channel.Channel parent, LinuxSocket fd, java.net.SocketAddress remote)
-
-
Method Detail
-
isOpen
public boolean isOpen()
- Specified by:
isOpenin interfaceio.netty.channel.Channel
-
isActive
public boolean isActive()
- Specified by:
isActivein interfaceio.netty.channel.Channel
-
metadata
public io.netty.channel.ChannelMetadata metadata()
- Specified by:
metadatain interfaceio.netty.channel.Channel
-
fd
public io.netty.channel.unix.FileDescriptor fd()
- Specified by:
fdin interfaceio.netty.channel.unix.UnixChannel
-
newUnsafe
protected abstract AbstractIOUringChannel.AbstractUringUnsafe newUnsafe()
- Specified by:
newUnsafein classio.netty.channel.AbstractChannel
-
ioUringUnsafe
AbstractIOUringChannel.AbstractUringUnsafe ioUringUnsafe()
-
isCompatible
protected boolean isCompatible(io.netty.channel.EventLoop loop)
- Specified by:
isCompatiblein classio.netty.channel.AbstractChannel
-
newDirectBuffer
protected final io.netty.buffer.ByteBuf newDirectBuffer(io.netty.buffer.ByteBuf buf)
-
newDirectBuffer
protected final io.netty.buffer.ByteBuf newDirectBuffer(java.lang.Object holder, io.netty.buffer.ByteBuf buf)
-
newDirectBuffer0
private static io.netty.buffer.ByteBuf newDirectBuffer0(java.lang.Object holder, io.netty.buffer.ByteBuf buf, io.netty.buffer.ByteBufAllocator alloc, int capacity)
-
doDisconnect
protected void doDisconnect() throws java.lang.Exception- Specified by:
doDisconnectin classio.netty.channel.AbstractChannel- Throws:
java.lang.Exception
-
submissionQueue
IOUringSubmissionQueue submissionQueue()
-
freeRemoteAddressMemory
private void freeRemoteAddressMemory()
-
freeMsgHdrArray
private void freeMsgHdrArray()
-
ioScheduled
boolean ioScheduled()
-
doClose
protected void doClose() throws java.lang.Exception- Specified by:
doClosein classio.netty.channel.AbstractChannel- Throws:
java.lang.Exception
-
doBeginRead
protected void doBeginRead()
- Specified by:
doBeginReadin classio.netty.channel.AbstractChannel
-
doWrite
protected void doWrite(io.netty.channel.ChannelOutboundBuffer in)
- Specified by:
doWritein classio.netty.channel.AbstractChannel
-
scheduleWrite
private int scheduleWrite(io.netty.channel.ChannelOutboundBuffer in)
-
schedulePollOut
private void schedulePollOut()
-
schedulePollRdHup
final void schedulePollRdHup()
-
resetCachedAddresses
final void resetCachedAddresses()
-
submitConnect
private void submitConnect(java.net.InetSocketAddress inetSocketAddress)
-
filterOutboundMessage
protected java.lang.Object filterOutboundMessage(java.lang.Object msg)
- Overrides:
filterOutboundMessagein classio.netty.channel.AbstractChannel
-
doRegister
protected void doRegister() throws java.lang.Exception- Overrides:
doRegisterin classio.netty.channel.AbstractChannel- Throws:
java.lang.Exception
-
doDeregister
protected final void doDeregister()
- Overrides:
doDeregisterin classio.netty.channel.AbstractChannel
-
doBind
protected void doBind(java.net.SocketAddress local) throws java.lang.Exception- Specified by:
doBindin classio.netty.channel.AbstractChannel- Throws:
java.lang.Exception
-
checkResolvable
protected static void checkResolvable(java.net.InetSocketAddress addr)
-
localAddress0
protected java.net.SocketAddress localAddress0()
- Specified by:
localAddress0in classio.netty.channel.AbstractChannel
-
remoteAddress0
protected java.net.SocketAddress remoteAddress0()
- Specified by:
remoteAddress0in classio.netty.channel.AbstractChannel
-
isAllowHalfClosure
private static boolean isAllowHalfClosure(io.netty.channel.ChannelConfig config)
-
cancelConnectTimeoutFuture
private void cancelConnectTimeoutFuture()
-
computeRemote
private void computeRemote()
-
shouldBreakIoUringInReady
private boolean shouldBreakIoUringInReady(io.netty.channel.ChannelConfig config)
-
clearPollFlag
public void clearPollFlag(int pollMask)
-
-