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) class
AbstractIOUringChannel.AbstractUringUnsafe
-
Field Summary
Fields Modifier and Type Field Description protected boolean
active
private static int
CONNECT_SCHEDULED
private io.netty.channel.ChannelPromise
connectPromise
The future of the current connection attempt.private java.util.concurrent.ScheduledFuture<?>
connectTimeoutFuture
private io.netty.channel.ChannelPromise
delayedClose
private boolean
inputClosedSeenErrorOnRead
private byte
ioState
private java.net.SocketAddress
local
private static io.netty.util.internal.logging.InternalLogger
logger
private static io.netty.channel.ChannelMetadata
METADATA
private MsgHdrMemoryArray
msgHdrMemoryArray
private short
numOutstandingReads
private short
numOutstandingWrites
private static int
POLL_IN_SCHEDULED
private static int
POLL_OUT_SCHEDULED
private static int
POLL_RDHUP_SCHEDULED
private static int
READ_SCHEDULED
private java.net.SocketAddress
remote
private java.nio.ByteBuffer
remoteAddressMemory
private java.net.SocketAddress
requestedRemoteAddress
(package private) LinuxSocket
socket
private IOUringSubmissionQueue
submissionQueue
private static int
WRITE_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 void
cancelConnectTimeoutFuture()
protected static void
checkResolvable(java.net.InetSocketAddress addr)
void
clearPollFlag(int pollMask)
private void
computeRemote()
protected void
doBeginRead()
protected void
doBind(java.net.SocketAddress local)
protected void
doClose()
protected void
doDeregister()
protected void
doDisconnect()
protected void
doRegister()
protected void
doWrite(io.netty.channel.ChannelOutboundBuffer in)
io.netty.channel.unix.FileDescriptor
fd()
protected java.lang.Object
filterOutboundMessage(java.lang.Object msg)
private void
freeMsgHdrArray()
private void
freeRemoteAddressMemory()
(package private) boolean
ioScheduled()
(package private) AbstractIOUringChannel.AbstractUringUnsafe
ioUringUnsafe()
boolean
isActive()
private static boolean
isAllowHalfClosure(io.netty.channel.ChannelConfig config)
protected boolean
isCompatible(io.netty.channel.EventLoop loop)
boolean
isOpen()
protected java.net.SocketAddress
localAddress0()
io.netty.channel.ChannelMetadata
metadata()
protected io.netty.buffer.ByteBuf
newDirectBuffer(io.netty.buffer.ByteBuf buf)
protected io.netty.buffer.ByteBuf
newDirectBuffer(java.lang.Object holder, io.netty.buffer.ByteBuf buf)
private static io.netty.buffer.ByteBuf
newDirectBuffer0(java.lang.Object holder, io.netty.buffer.ByteBuf buf, io.netty.buffer.ByteBufAllocator alloc, int capacity)
protected abstract AbstractIOUringChannel.AbstractUringUnsafe
newUnsafe()
protected java.net.SocketAddress
remoteAddress0()
(package private) void
resetCachedAddresses()
private void
schedulePollOut()
(package private) void
schedulePollRdHup()
private int
scheduleWrite(io.netty.channel.ChannelOutboundBuffer in)
private boolean
shouldBreakIoUringInReady(io.netty.channel.ChannelConfig config)
(package private) IOUringSubmissionQueue
submissionQueue()
private void
submitConnect(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:
isOpen
in interfaceio.netty.channel.Channel
-
isActive
public boolean isActive()
- Specified by:
isActive
in interfaceio.netty.channel.Channel
-
metadata
public io.netty.channel.ChannelMetadata metadata()
- Specified by:
metadata
in interfaceio.netty.channel.Channel
-
fd
public io.netty.channel.unix.FileDescriptor fd()
- Specified by:
fd
in interfaceio.netty.channel.unix.UnixChannel
-
newUnsafe
protected abstract AbstractIOUringChannel.AbstractUringUnsafe newUnsafe()
- Specified by:
newUnsafe
in classio.netty.channel.AbstractChannel
-
ioUringUnsafe
AbstractIOUringChannel.AbstractUringUnsafe ioUringUnsafe()
-
isCompatible
protected boolean isCompatible(io.netty.channel.EventLoop loop)
- Specified by:
isCompatible
in 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:
doDisconnect
in 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:
doClose
in classio.netty.channel.AbstractChannel
- Throws:
java.lang.Exception
-
doBeginRead
protected void doBeginRead()
- Specified by:
doBeginRead
in classio.netty.channel.AbstractChannel
-
doWrite
protected void doWrite(io.netty.channel.ChannelOutboundBuffer in)
- Specified by:
doWrite
in 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:
filterOutboundMessage
in classio.netty.channel.AbstractChannel
-
doRegister
protected void doRegister() throws java.lang.Exception
- Overrides:
doRegister
in classio.netty.channel.AbstractChannel
- Throws:
java.lang.Exception
-
doDeregister
protected final void doDeregister()
- Overrides:
doDeregister
in classio.netty.channel.AbstractChannel
-
doBind
protected void doBind(java.net.SocketAddress local) throws java.lang.Exception
- Specified by:
doBind
in 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:
localAddress0
in classio.netty.channel.AbstractChannel
-
remoteAddress0
protected java.net.SocketAddress remoteAddress0()
- Specified by:
remoteAddress0
in 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)
-
-