LocalIoRegistration Class — netty Architecture
Architecture documentation for the LocalIoRegistration class in LocalIoHandler.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 4b8753ff_21d9_fedc_7457_60275721bd3c["LocalIoRegistration"] 88851f73_e942_d811_8305_35c4ce757ab4["LocalIoHandler.java"] 4b8753ff_21d9_fedc_7457_60275721bd3c -->|defined in| 88851f73_e942_d811_8305_35c4ce757ab4 068e7fe9_03ff_9142_7dac_740549ce6429["LocalIoRegistration()"] 4b8753ff_21d9_fedc_7457_60275721bd3c -->|method| 068e7fe9_03ff_9142_7dac_740549ce6429 9b9a40fe_ad79_d119_966c_300e0c975e85["T()"] 4b8753ff_21d9_fedc_7457_60275721bd3c -->|method| 9b9a40fe_ad79_d119_966c_300e0c975e85 95530499_bd65_32eb_0b64_6f8621ed052a["submit()"] 4b8753ff_21d9_fedc_7457_60275721bd3c -->|method| 95530499_bd65_32eb_0b64_6f8621ed052a 147de8ff_3d47_fb8c_9940_60e9cf6f4bed["isValid()"] 4b8753ff_21d9_fedc_7457_60275721bd3c -->|method| 147de8ff_3d47_fb8c_9940_60e9cf6f4bed f7f15402_0515_6bbd_7ac7_806a1bf6116d["cancel()"] 4b8753ff_21d9_fedc_7457_60275721bd3c -->|method| f7f15402_0515_6bbd_7ac7_806a1bf6116d cbb35c70_2795_a1a5_2322_95fc8a550b1b["cancel0()"] 4b8753ff_21d9_fedc_7457_60275721bd3c -->|method| cbb35c70_2795_a1a5_2322_95fc8a550b1b
Relationship Graph
Source Code
transport/src/main/java/io/netty/channel/local/LocalIoHandler.java lines 111–154
private final class LocalIoRegistration implements IoRegistration {
private final AtomicBoolean canceled = new AtomicBoolean();
private final ThreadAwareExecutor executor;
private final LocalIoHandle handle;
LocalIoRegistration(ThreadAwareExecutor executor, LocalIoHandle handle) {
this.executor = executor;
this.handle = handle;
}
@Override
public <T> T attachment() {
return null;
}
@Override
public long submit(IoOps ops) {
throw new UnsupportedOperationException();
}
@Override
public boolean isValid() {
return !canceled.get();
}
@Override
public boolean cancel() {
if (!canceled.compareAndSet(false, true)) {
return false;
}
if (executor.isExecutorThread(Thread.currentThread())) {
cancel0();
} else {
executor.execute(this::cancel0);
}
return true;
}
private void cancel0() {
if (registeredChannels.remove(handle)) {
handle.unregistered();
}
}
}
Source
Frequently Asked Questions
What is the LocalIoRegistration class?
LocalIoRegistration is a class in the netty codebase, defined in transport/src/main/java/io/netty/channel/local/LocalIoHandler.java.
Where is LocalIoRegistration defined?
LocalIoRegistration is defined in transport/src/main/java/io/netty/channel/local/LocalIoHandler.java at line 111.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free