public void close(Handler<AsyncResult<Void>> completionHandler) { webServer.close(completionHandler); collectorRegistry.clear(); } }
public void close(Handler<AsyncResult<Void>> completionHandler) { webServer.close(completionHandler); collectorRegistry.clear(); } }
@Override protected int startServer(ContextHandlerCollection contexts) throws Exception { if (0 != getHttpPort()) { return super.startServer(contexts); } Server server = new Server(Constants.DEFAULT_PEER_PORT); try { return startServer(contexts, server); } catch (Exception e) { log.warn("could not bind to default port " + Constants.DEFAULT_PEER_PORT + " will fallback to random port", e); server.stop(); CollectorRegistry.defaultRegistry.clear(); } server = new Server(0); return startServer(contexts, server); }
CollectorRegistry.defaultRegistry.clear(); this.assertionConfig = tmpAssertConfig; this.samplerConfig = tmpSamplerConfig;