本文整理了Java中io.netty.channel.epoll.Epoll.unavailabilityCause()
方法的一些代码示例,展示了Epoll.unavailabilityCause()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Epoll.unavailabilityCause()
方法的具体详情如下:
包路径:io.netty.channel.epoll.Epoll
类名称:Epoll
方法名:unavailabilityCause
[英]Returns the cause of unavailability of netty-transport-native-epoll.
[中]返回netty-transport-native-epoll不可用的原因。
代码示例来源:origin: eclipse-vertx/vert.x
@Override
public Throwable unavailabilityCause() {
return Epoll.unavailabilityCause();
}
代码示例来源:origin: io.vertx/vertx-core
@Override
public Throwable unavailabilityCause() {
return Epoll.unavailabilityCause();
}
代码示例来源:origin: org.opendaylight.bgpcep/pcep-pcc-mock
private void setChannelFactory(final Bootstrap bootstrap, final Optional<KeyMapping> keys) {
if(Epoll.isAvailable()) {
bootstrap.channel(EpollSocketChannel.class);
bootstrap.option(EpollChannelOption.EPOLL_MODE, EpollMode.LEVEL_TRIGGERED);
} else {
bootstrap.channel(NioSocketChannel.class);
}
if (keys.isPresent()) {
if (Epoll.isAvailable()) {
bootstrap.option(EpollChannelOption.TCP_MD5SIG, keys.get());
} else {
throw new UnsupportedOperationException(Epoll.unavailabilityCause().getCause());
}
}
}
代码示例来源:origin: org.opendaylight.bgpcep/bgp-rib-impl
protected Bootstrap createClientBootStrap(final Optional<KeyMapping> keys, final EventLoopGroup workerGroup) {
final Bootstrap bootstrap = new Bootstrap();
if (Epoll.isAvailable()) {
bootstrap.channel(EpollSocketChannel.class);
bootstrap.option(EpollChannelOption.EPOLL_MODE, EpollMode.LEVEL_TRIGGERED);
} else {
bootstrap.channel(NioSocketChannel.class);
}
if (keys.isPresent()) {
if (Epoll.isAvailable()) {
bootstrap.option(EpollChannelOption.TCP_MD5SIG, keys.get());
} else {
throw new UnsupportedOperationException(Epoll.unavailabilityCause().getCause());
}
}
// Make sure we are doing round-robin processing
bootstrap.option(ChannelOption.MAX_MESSAGES_PER_READ, 1);
bootstrap.option(ChannelOption.SO_KEEPALIVE, Boolean.TRUE);
bootstrap.option(ChannelOption.WRITE_BUFFER_HIGH_WATER_MARK, HIGH_WATER_MARK);
bootstrap.option(ChannelOption.WRITE_BUFFER_LOW_WATER_MARK, LOW_WATER_MARK);
if (bootstrap.group() == null) {
bootstrap.group(workerGroup);
}
return bootstrap;
}
代码示例来源:origin: org.opendaylight.bgpcep/bgp-bmp-impl
b.option(EpollChannelOption.TCP_MD5SIG, keys.get());
} else {
throw new UnsupportedOperationException (Epoll.unavailabilityCause().getCause());
代码示例来源:origin: org.opendaylight.bgpcep/pcep-impl
protected ServerBootstrap createServerBootstrap(final ChannelPipelineInitializer initializer) {
final ServerBootstrap b = new ServerBootstrap();
b.childHandler(new ChannelInitializer<SocketChannel>() {
@Override
protected void initChannel(final SocketChannel ch) {
initializer.initializeChannel(ch, new DefaultPromise(PCEPDispatcherImpl.this.executor));
}
});
b.option(ChannelOption.SO_BACKLOG, SOCKET_BACKLOG_SIZE);
b.childOption(ChannelOption.ALLOCATOR, PooledByteBufAllocator.DEFAULT);
if (Epoll.isAvailable()) {
b.channel(EpollServerSocketChannel.class);
b.childOption(EpollChannelOption.EPOLL_MODE, EpollMode.LEVEL_TRIGGERED);
} else {
b.channel(NioServerSocketChannel.class);
}
if (this.keys.isPresent()) {
if (Epoll.isAvailable()) {
b.option(EpollChannelOption.TCP_MD5SIG, this.keys.get());
} else {
throw new UnsupportedOperationException(Epoll.unavailabilityCause().getCause());
}
}
// Make sure we are doing round-robin processing
b.childOption(ChannelOption.MAX_MESSAGES_PER_READ, 1);
if (b.group() == null) {
b.group(this.bossGroup, this.workerGroup);
}
return b;
}
代码示例来源:origin: org.opendaylight.bgpcep/bgp-bmp-impl
b.option(EpollChannelOption.TCP_MD5SIG, keys.get());
} else {
throw new UnsupportedOperationException (Epoll.unavailabilityCause().getCause());
代码示例来源:origin: org.restcomm.imscf/imscf-common
if (config.getListenerMode() == Configuration.ListenerMode.EPOLL) {
LOGGER.warn("EPOLL listener mode is configured but it is unavailable. Cause follows.",
Epoll.unavailabilityCause());
内容来源于网络,如有侵权,请联系作者删除!