KQueueSocketChannelUnsafe Class — netty Architecture
Architecture documentation for the KQueueSocketChannelUnsafe class in KQueueSocketChannel.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 3fcc25cc_e23e_7ed9_0d63_3008a308e257["KQueueSocketChannelUnsafe"] aa6e4f51_9cb6_4d73_ecd4_16bd8179baaf["KQueueSocketChannel.java"] 3fcc25cc_e23e_7ed9_0d63_3008a308e257 -->|defined in| aa6e4f51_9cb6_4d73_ecd4_16bd8179baaf 5c805da4_1cd8_73dc_8fd8_988f9c711f44["Executor()"] 3fcc25cc_e23e_7ed9_0d63_3008a308e257 -->|method| 5c805da4_1cd8_73dc_8fd8_988f9c711f44
Relationship Graph
Source Code
transport-classes-kqueue/src/main/java/io/netty/channel/kqueue/KQueueSocketChannel.java lines 118–139
private final class KQueueSocketChannelUnsafe extends KQueueStreamUnsafe {
@Override
protected Executor prepareToClose() {
try {
// Check isOpen() first as otherwise it will throw a RuntimeException
// when call getSoLinger() as the fd is not valid anymore.
if (isOpen() && config().getSoLinger() > 0) {
// We need to cancel this key of the channel so we may not end up in a eventloop spin
// because we try to read or write until the actual close happens which may be later due
// SO_LINGER handling.
// See https://github.com/netty/netty/issues/4449
doDeregister();
return GlobalEventExecutor.INSTANCE;
}
} catch (Throwable ignore) {
// Ignore the error as the underlying channel may be closed in the meantime and so
// getSoLinger() may produce an exception. In this case we just return null.
// See https://github.com/netty/netty/issues/4449
}
return null;
}
}
Source
Frequently Asked Questions
What is the KQueueSocketChannelUnsafe class?
KQueueSocketChannelUnsafe is a class in the netty codebase, defined in transport-classes-kqueue/src/main/java/io/netty/channel/kqueue/KQueueSocketChannel.java.
Where is KQueueSocketChannelUnsafe defined?
KQueueSocketChannelUnsafe is defined in transport-classes-kqueue/src/main/java/io/netty/channel/kqueue/KQueueSocketChannel.java at line 118.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free