AbstractIoUringChannel Class — netty Architecture
Architecture documentation for the AbstractIoUringChannel class in AbstractIoUringChannel.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 9a4cac3b_00a7_737a_49b1_42ae60ccb637["AbstractIoUringChannel"] 4b3ce6a2_c54b_28e3_daab_355d73fb6815["AbstractIoUringChannel.java"] 9a4cac3b_00a7_737a_49b1_42ae60ccb637 -->|defined in| 4b3ce6a2_c54b_28e3_daab_355d73fb6815 4cb59038_f622_00df_cb0b_45dd1188f1b3["AbstractIoUringChannel()"] 9a4cac3b_00a7_737a_49b1_42ae60ccb637 -->|method| 4cb59038_f622_00df_cb0b_45dd1188f1b3 8bed10a9_41d6_7cce_dd5b_d901c04ac9bd["autoReadCleared()"] 9a4cac3b_00a7_737a_49b1_42ae60ccb637 -->|method| 8bed10a9_41d6_7cce_dd5b_d901c04ac9bd d0e504b9_9bc1_1d29_75fd_2c767ed8b749["clearRead()"] 9a4cac3b_00a7_737a_49b1_42ae60ccb637 -->|method| d0e504b9_9bc1_1d29_75fd_2c767ed8b749 1ba81e82_52fd_8c00_5349_286d47207e92["nextOpsId()"] 9a4cac3b_00a7_737a_49b1_42ae60ccb637 -->|method| 1ba81e82_52fd_8c00_5349_286d47207e92 ef2fef5d_26ce_1c59_56b9_eed2c0359c15["isOpen()"] 9a4cac3b_00a7_737a_49b1_42ae60ccb637 -->|method| ef2fef5d_26ce_1c59_56b9_eed2c0359c15 504e72a6_d5e9_6b52_5a10_ab3991dcd667["isActive()"] 9a4cac3b_00a7_737a_49b1_42ae60ccb637 -->|method| 504e72a6_d5e9_6b52_5a10_ab3991dcd667 df6c3876_7897_38f6_3755_599cf812bb70["FileDescriptor()"] 9a4cac3b_00a7_737a_49b1_42ae60ccb637 -->|method| df6c3876_7897_38f6_3755_599cf812bb70 701ef1dc_7fb6_7246_db96_f1c16d9c63cf["AbstractUringUnsafe()"] 9a4cac3b_00a7_737a_49b1_42ae60ccb637 -->|method| 701ef1dc_7fb6_7246_db96_f1c16d9c63cf a4fd3667_f2c8_a495_006b_2e34f65a40f7["isCompatible()"] 9a4cac3b_00a7_737a_49b1_42ae60ccb637 -->|method| a4fd3667_f2c8_a495_006b_2e34f65a40f7 42a7969f_12de_3b18_d1d1_94e3c74d726f["ByteBuf()"] 9a4cac3b_00a7_737a_49b1_42ae60ccb637 -->|method| 42a7969f_12de_3b18_d1d1_94e3c74d726f 4df97aa8_7d45_8874_aafa_e7ab1acffb06["allowMultiShotPollIn()"] 9a4cac3b_00a7_737a_49b1_42ae60ccb637 -->|method| 4df97aa8_7d45_8874_aafa_e7ab1acffb06 4322bd6c_f77e_8852_f769_2518a4dfe305["cancelOutstandingReads()"] 9a4cac3b_00a7_737a_49b1_42ae60ccb637 -->|method| 4322bd6c_f77e_8852_f769_2518a4dfe305 f7f2783e_4ebd_1630_1fd9_e5c63194b2b8["cancelOutstandingWrites()"] 9a4cac3b_00a7_737a_49b1_42ae60ccb637 -->|method| f7f2783e_4ebd_1630_1fd9_e5c63194b2b8
Relationship Graph
Source Code
transport-classes-io_uring/src/main/java/io/netty/channel/uring/AbstractIoUringChannel.java lines 73–1285
abstract class AbstractIoUringChannel extends AbstractChannel implements UnixChannel {
private static final InternalLogger logger = InternalLoggerFactory.getInstance(AbstractIoUringChannel.class);
final LinuxSocket socket;
protected volatile boolean active;
// Different masks for outstanding I/O operations.
private static final int POLL_IN_SCHEDULED = 1;
private static final int POLL_OUT_SCHEDULED = 1 << 2;
private static final int POLL_RDHUP_SCHEDULED = 1 << 3;
private static final int WRITE_SCHEDULED = 1 << 4;
private static final int READ_SCHEDULED = 1 << 5;
private static final int CONNECT_SCHEDULED = 1 << 6;
private short opsId = Short.MIN_VALUE;
private long pollInId;
private long pollOutId;
private long pollRdhupId;
private long connectId;
// A byte is enough for now.
private byte ioState;
// It's possible that multiple read / writes are issued. We need to keep track of these.
// Let's limit the amount of pending writes and reads by Short.MAX_VALUE. Maybe Byte.MAX_VALUE would also be good
// enough but let's be a bit more flexible for now.
private short numOutstandingWrites;
// A value of -1 means that multi-shot is used and so reads will be issued as long as the request is not canceled.
private short numOutstandingReads;
private boolean readPending;
private boolean inReadComplete;
private boolean socketHasMoreData;
private static final class DelayedClose {
private final ChannelPromise promise;
private final Throwable cause;
private final ClosedChannelException closeCause;
DelayedClose(ChannelPromise promise, Throwable cause, ClosedChannelException closeCause) {
this.promise = promise;
this.cause = cause;
this.closeCause = closeCause;
}
}
private DelayedClose delayedClose;
private boolean inputClosedSeenErrorOnRead;
/**
* The future of the current connection attempt. If not null, subsequent connection attempts will fail.
*/
private ChannelPromise connectPromise;
private ScheduledFuture<?> connectTimeoutFuture;
private SocketAddress requestedRemoteAddress;
private CleanableDirectBuffer cleanable;
private ByteBuffer remoteAddressMemory;
private MsgHdrMemoryArray msgHdrMemoryArray;
private IoRegistration registration;
private volatile SocketAddress local;
private volatile SocketAddress remote;
AbstractIoUringChannel(final Channel parent, LinuxSocket socket, boolean active) {
super(parent);
this.socket = checkNotNull(socket, "fd");
if (active) {
// Directly cache the remote and local addresses
// See https://github.com/netty/netty/issues/2359
this.active = true;
this.local = socket.localAddress();
this.remote = socket.remoteAddress();
}
logger.trace("Create {} Socket: {}", this instanceof ServerChannel ? "Server" : "Channel", socket.intValue());
}
AbstractIoUringChannel(Channel parent, LinuxSocket fd, SocketAddress remote) {
super(parent);
this.socket = checkNotNull(fd, "fd");
Defined In
Source
Frequently Asked Questions
What is the AbstractIoUringChannel class?
AbstractIoUringChannel is a class in the netty codebase, defined in transport-classes-io_uring/src/main/java/io/netty/channel/uring/AbstractIoUringChannel.java.
Where is AbstractIoUringChannel defined?
AbstractIoUringChannel is defined in transport-classes-io_uring/src/main/java/io/netty/channel/uring/AbstractIoUringChannel.java at line 73.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free