openFileDescriptors() — netty Function Reference
Architecture documentation for the openFileDescriptors() function in EpollIoHandler.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 971d9f3b_e81e_dc5f_753e_454755fc5aec["openFileDescriptors()"] e531fecb_b495_8b97_8d1b_49ff2b5ccdbb["EpollIoHandler"] 971d9f3b_e81e_dc5f_753e_454755fc5aec -->|defined in| e531fecb_b495_8b97_8d1b_49ff2b5ccdbb 40c77ccb_a5b7_aed0_8603_28bc38d7dc1d["EpollIoHandler()"] 40c77ccb_a5b7_aed0_8603_28bc38d7dc1d -->|calls| 971d9f3b_e81e_dc5f_753e_454755fc5aec cf0e10de_7ce5_c698_1c75_d701a03a88b4["closeFileDescriptor()"] 971d9f3b_e81e_dc5f_753e_454755fc5aec -->|calls| cf0e10de_7ce5_c698_1c75_d701a03a88b4 style 971d9f3b_e81e_dc5f_753e_454755fc5aec fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
transport-classes-epoll/src/main/java/io/netty/channel/epoll/EpollIoHandler.java lines 158–190
@UnstableApi
public void openFileDescriptors() {
boolean success = false;
FileDescriptor epollFd = null;
FileDescriptor eventFd = null;
FileDescriptor timerFd = null;
try {
this.epollFd = epollFd = Native.newEpollCreate();
this.eventFd = eventFd = Native.newEventFd();
try {
// It is important to use EPOLLET here as we only want to get the notification once per
// wakeup and don't call eventfd_read(...).
Native.epollCtlAdd(epollFd.intValue(), eventFd.intValue(), Native.EPOLLIN | Native.EPOLLET);
} catch (IOException e) {
throw new IllegalStateException("Unable to add eventFd filedescriptor to epoll", e);
}
this.timerFd = timerFd = Native.newTimerFd();
try {
// It is important to use EPOLLET here as we only want to get the notification once per
// wakeup and don't call read(...).
Native.epollCtlAdd(epollFd.intValue(), timerFd.intValue(), Native.EPOLLIN | Native.EPOLLET);
} catch (IOException e) {
throw new IllegalStateException("Unable to add timerFd filedescriptor to epoll", e);
}
success = true;
} finally {
if (!success) {
closeFileDescriptor(epollFd);
closeFileDescriptor(eventFd);
closeFileDescriptor(timerFd);
}
}
}
Domain
Subdomains
Calls
Called By
Source
Frequently Asked Questions
What does openFileDescriptors() do?
openFileDescriptors() is a function in the netty codebase, defined in transport-classes-epoll/src/main/java/io/netty/channel/epoll/EpollIoHandler.java.
Where is openFileDescriptors() defined?
openFileDescriptors() is defined in transport-classes-epoll/src/main/java/io/netty/channel/epoll/EpollIoHandler.java at line 158.
What does openFileDescriptors() call?
openFileDescriptors() calls 1 function(s): closeFileDescriptor.
What calls openFileDescriptors()?
openFileDescriptors() is called by 1 function(s): EpollIoHandler.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free