java.net.BindException.getCause()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(2.2k)|赞(0)|评价(0)|浏览(105)

本文整理了Java中java.net.BindException.getCause()方法的一些代码示例,展示了BindException.getCause()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。BindException.getCause()方法的具体详情如下:
包路径:java.net.BindException
类名称:BindException
方法名:getCause

BindException.getCause介绍

暂无

代码示例

代码示例来源:origin: apache/hbase

protected RpcServerInterface createRpcServer(Server server, Configuration conf,
  RpcSchedulerFactory rpcSchedulerFactory, InetSocketAddress bindAddress, String name)
  throws IOException {
 boolean reservoirEnabled = conf.getBoolean(RESERVOIR_ENABLED_KEY, true);
 try {
  return RpcServerFactory.createRpcServer(server, name, getServices(),
    bindAddress, // use final bindAddress for this server.
    conf, rpcSchedulerFactory.create(conf, this, server), reservoirEnabled);
 } catch (BindException be) {
  throw new IOException(be.getMessage() + ". To switch ports use the '"
    + HConstants.REGIONSERVER_PORT + "' configuration property.",
    be.getCause() != null ? be.getCause() : be);
 }
}

代码示例来源:origin: apache/hbase

@Override
protected RpcServerInterface createRpcServer(Server server, Configuration conf,
  RpcSchedulerFactory rpcSchedulerFactory, InetSocketAddress bindAddress, String name)
  throws IOException {
 // RpcServer at HM by default enable ByteBufferPool iff HM having user table region in it
 boolean reservoirEnabled = conf.getBoolean(RESERVOIR_ENABLED_KEY,
   LoadBalancer.isMasterCanHostUserRegions(conf));
 try {
  return RpcServerFactory.createRpcServer(server, name, getServices(),
    bindAddress, // use final bindAddress for this server.
    conf, rpcSchedulerFactory.create(conf, this, server), reservoirEnabled);
 } catch (BindException be) {
  throw new IOException(be.getMessage() + ". To switch ports use the '"
    + HConstants.MASTER_PORT + "' configuration property.",
    be.getCause() != null ? be.getCause() : be);
 }
}

代码示例来源:origin: org.apache.hadoop/hadoop-hdfs

private static BindException appendMessageToBindException(BindException e,
   String msg) {
  BindException newBe = new BindException(e.getMessage() + " " + msg);
  newBe.initCause(e.getCause());
  newBe.setStackTrace(e.getStackTrace());
  return newBe;
 }
}

代码示例来源:origin: harbby/presto-connectors

HConstants.REGIONSERVER_PORT;
throw new IOException(be.getMessage() + ". To switch ports use the '" + configName +
  "' configuration property.", be.getCause() != null ? be.getCause() : be);

相关文章