(String optionName)
| 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; |
no test coverage detected