public void close() { try { docker.close(); } catch (IOException e) { log.error("Docker Close Error", e); } }
private static void closeQuietly(DockerClient dockerClient) { if (dockerClient != null) { try { dockerClient.close(); } catch (IOException e) { // Ignore } } } }
@java.lang.SuppressWarnings("all") public void close() throws java.io.IOException { this.wrappedClient.close(); } }
@Override public void close() { try { this.dockerClient.close(); } catch (IOException e) { log.warn("Could not close docker client", e); } }
/** * Really closes the underlying {@link DockerClient}. */ public void reallyClose() throws IOException { getDelegate().close(); } }
@Override public void close() throws IOException { getDelegate().close(); }
/** * Connects to Docker. <em>NOTE:</em> This should not be used for any * long-running operations as the client it returns is not protected from * closure. * * @deprecated Use {@link #getDockerApi()} and then * {@link DockerAPI#getClient()} to get the client, followed by * a call to {@link DockerClient#close()}. * @return Docker client. */ @Deprecated public DockerClient getClient() { try { // get a client final DockerClient client = dockerApi.getClient(); // now release it so it'll be cached for a duration but will be // reaped when the cache duration expires without anyone having to // call anything else to make this happen. client.close(); return client; } catch (IOException ex) { throw new RuntimeException(ex); } }
@Override public void close() { if (client != null) { try { execFactory.close(); getClient().close(); } catch (IOException e) { log.error("Exception closing Docker client", e); } } }
@Override public void close() { if (client != null) { try { execFactory.close(); getClient().close(); } catch (IOException e) { log.error("Exception closing Docker client", e); } } }
/** * reinitialization of docker client */ public void reInitDockerClient() { try { if (null != dockerClient) { dockerClient.close(); } } catch (IOException e) { logError(MODULE_NAME, "Docker client closing failed - " + e.getMessage(), e); } initDockerClient(); }
@AfterClass public static void afterBaseDockerTest() throws IOException { dockerTester.stopAll(); dockerTester.docker().close(); }
@Override public void close(Handler<Void> completionHandler) { vertx.cancelTimer(timer); try { started = false; client.close(); LOGGER.info("Successfully closed the service importer " + this); } catch (IOException e) { LOGGER.error("A failure has been caught while stopping " + this, e); } if (completionHandler != null) { completionHandler.handle(null); } }
this.dockerClient.close(); } catch (IOException ioe) { throw new RuntimeException(ioe);
this.dockerClient.close(); } catch (IOException ioe) { throw new RuntimeException(ioe);
@Override public void close() { try { try { client.stopContainerCmd(containerInfo.getId()).withTimeout(30).exec(); } catch (Exception ex) { // no-op } client.removeContainerCmd(containerInfo.getId()) .withForce(true) .withRemoveVolumes(true) .exec(); client.close(); } catch (Exception e) { // no-op } isClosed = true; }
@After public void tearDown() throws IOException { List<Container> running = client.listContainersCmd() .withStatusFilter("running").exec(); if (running != null) { running.forEach(container -> client.stopContainerCmd(container.getId()).exec()); } client.close(); discovery.close(); vertx.close(); }
@After public void tearDown() throws IOException { List<Container> running = client.listContainersCmd() .withStatusFilter("running").exec(); if (running != null) { running.forEach(container -> client.stopContainerCmd(container.getId()).exec()); } client.close(); discovery.close(); vertx.close(); }