EpollIoOps Class — netty Architecture
Architecture documentation for the EpollIoOps class in EpollIoOps.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 5566f9d6_dddc_e6ad_8012_51f7ccd6a585["EpollIoOps"] 7f3695ee_3219_edc7_b288_88947143c3a8["EpollIoOps.java"] 5566f9d6_dddc_e6ad_8012_51f7ccd6a585 -->|defined in| 7f3695ee_3219_edc7_b288_88947143c3a8 2746222d_d690_bf17_e594_823ee2be00d5["addToArray()"] 5566f9d6_dddc_e6ad_8012_51f7ccd6a585 -->|method| 2746222d_d690_bf17_e594_823ee2be00d5 744979e6_180a_3d4f_2279_4dc867d12bfb["EpollIoOps()"] 5566f9d6_dddc_e6ad_8012_51f7ccd6a585 -->|method| 744979e6_180a_3d4f_2279_4dc867d12bfb f001f76c_3618_a46a_c5f1_7549d849a023["contains()"] 5566f9d6_dddc_e6ad_8012_51f7ccd6a585 -->|method| f001f76c_3618_a46a_c5f1_7549d849a023 c747d7a6_66ee_c1ea_cede_1e708de350a9["value()"] 5566f9d6_dddc_e6ad_8012_51f7ccd6a585 -->|method| c747d7a6_66ee_c1ea_cede_1e708de350a9 b707190d_1fb5_8473_81ee_34171c63e41d["equals()"] 5566f9d6_dddc_e6ad_8012_51f7ccd6a585 -->|method| b707190d_1fb5_8473_81ee_34171c63e41d 11aa0172_2f98_fea4_8aac_d4f426797fe3["hashCode()"] 5566f9d6_dddc_e6ad_8012_51f7ccd6a585 -->|method| 11aa0172_2f98_fea4_8aac_d4f426797fe3 d214cdef_bcee_ae93_23e7_82c7b3996792["String()"] 5566f9d6_dddc_e6ad_8012_51f7ccd6a585 -->|method| d214cdef_bcee_ae93_23e7_82c7b3996792 5c07cef4_7c6b_aa19_93bf_e75a52402889["EpollIoEvent()"] 5566f9d6_dddc_e6ad_8012_51f7ccd6a585 -->|method| 5c07cef4_7c6b_aa19_93bf_e75a52402889
Relationship Graph
Source Code
transport-classes-epoll/src/main/java/io/netty/channel/epoll/EpollIoOps.java lines 23–209
public final class EpollIoOps implements IoOps {
static {
// Need to ensure we load the native lib before trying to use the values in Native to construct the different
// instances.
Epoll.ensureAvailability();
}
/**
* Interested in IO events which tell that the underlying channel is writable again or a connection
* attempt can be continued.
*/
public static final EpollIoOps EPOLLOUT = new EpollIoOps(Native.EPOLLOUT);
/**
* Interested in IO events which should be handled by finish pending connect operations
*/
public static final EpollIoOps EPOLLIN = new EpollIoOps(Native.EPOLLIN);
/**
* Error condition happened on the associated file descriptor.
*/
public static final EpollIoOps EPOLLERR = new EpollIoOps(Native.EPOLLERR);
/**
* Interested in IO events which should be handled by reading data.
*/
public static final EpollIoOps EPOLLRDHUP = new EpollIoOps(Native.EPOLLRDHUP);
public static final EpollIoOps EPOLLET = new EpollIoOps(Native.EPOLLET);
static final int EPOLL_ERR_OUT_MASK = EpollIoOps.EPOLLERR.value | EpollIoOps.EPOLLOUT.value;
static final int EPOLL_ERR_IN_MASK = EpollIoOps.EPOLLERR.value | EpollIoOps.EPOLLIN.value;
static final int EPOLL_RDHUP_MASK = EpollIoOps.EPOLLRDHUP.value;
// Just use an array to store often used values.
private static final EpollIoEvent[] EVENTS;
static {
EpollIoOps all = new EpollIoOps(EPOLLOUT.value | EPOLLIN.value | EPOLLERR.value | EPOLLRDHUP.value);
EVENTS = new EpollIoEvent[all.value + 1];
addToArray(EVENTS, EPOLLOUT);
addToArray(EVENTS, EPOLLIN);
addToArray(EVENTS, EPOLLERR);
addToArray(EVENTS, EPOLLRDHUP);
addToArray(EVENTS, all);
}
private static void addToArray(EpollIoEvent[] array, EpollIoOps ops) {
array[ops.value] = new DefaultEpollIoEvent(ops);
}
final int value;
private EpollIoOps(int value) {
this.value = value;
}
/**
* Returns {@code true} if this {@link EpollIoOps} is a combination of the given {@link EpollIoOps}.
* @param ops the ops.
* @return {@code true} if a combination of the given.
*/
public boolean contains(EpollIoOps ops) {
return (value & ops.value) != 0;
}
boolean contains(int value) {
return (this.value & value) != 0;
}
/**
* Return a {@link EpollIoOps} which is a combination of the current and the given {@link EpollIoOps}.
*
* @param ops the {@link EpollIoOps} that should be added to this one.
* @return a {@link EpollIoOps}.
*/
public EpollIoOps with(EpollIoOps ops) {
if (contains(ops)) {
return this;
}
Source
Frequently Asked Questions
What is the EpollIoOps class?
EpollIoOps is a class in the netty codebase, defined in transport-classes-epoll/src/main/java/io/netty/channel/epoll/EpollIoOps.java.
Where is EpollIoOps defined?
EpollIoOps is defined in transport-classes-epoll/src/main/java/io/netty/channel/epoll/EpollIoOps.java at line 23.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free