org.apache.avro.ipc.HttpServer.close()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(1.3k)|赞(0)|评价(0)|浏览(245)

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

HttpServer.close介绍

暂无

代码示例

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

@Override
public void stop() {
 http.close();
 super.stop();
}

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

/** Sends RPCs and returns nanos elapsed. */
private static long sendRpcs(boolean withPlugin) throws IOException {
 HttpServer server = createServer(withPlugin);
 Transceiver t =
  new HttpTransceiver(new URL("http://127.0.0.1:"+server.getPort()+"/"));
 GenericRequestor requestor = new GenericRequestor(NULL_PROTOCOL, t);
 long now = System.nanoTime();
 for (int i = 0; i < COUNT; ++i) {
  requestor.request("null", null);
 }
 long elapsed = System.nanoTime() - now;
 t.close();
 server.close();
 return elapsed;
}

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

int run2(PrintStream err) throws InterruptedException {
 latch.await();
 err.println("Closing server.");
 server.close();
 return 0;
}

代码示例来源:origin: org.apache.cassandra.deps/avro

int run2(PrintStream err) throws InterruptedException {
 latch.await();
 err.println("Closing server.");
 server.close();
 return 0;
}

代码示例来源:origin: org.apache.flume.flume-ng-legacy-sources/flume-avro-source

@Override
public void stop() {
 http.close();
 super.stop();
}

相关文章