MCPcopy Create free account
hub / github.com/grpc/grpc-java / getEpollChannelOption

Method getEpollChannelOption

netty/src/main/java/io/grpc/netty/Utils.java:473–487  ·  view source on GitHub ↗
(String optionName)

Source from the content-addressed store, hash-verified

471 }
472
473 @Nullable
474 @SuppressWarnings("unchecked")
475 private static <T> ChannelOption<T> getEpollChannelOption(String optionName) {
476 if (isEpollAvailable()) {
477 try {
478 return
479 (ChannelOption<T>) Class.forName("io.netty.channel.epoll.EpollChannelOption")
480 .getField(optionName)
481 .get(null);
482 } catch (Exception e) {
483 throw new RuntimeException("ChannelOption(" + optionName + ") is not available", e);
484 }
485 }
486 return null;
487 }
488
489 private static final class DefaultEventLoopGroupResource implements Resource<EventLoopGroup> {
490 private final String name;

Callers 1

Calls 3

isEpollAvailableMethod · 0.95
getMethod · 0.65
forNameMethod · 0.45

Tested by

no test coverage detected