@Override public void destroy() throws Exception { try { log.info("Closing elasticSearch client"); if (client != null) { client.close(); } } catch (final Exception e) { log.error("Error closing ElasticSearch client: ", e); } }
@Override default void close() throws IOException { rest().close(); } }
@Override public void close() throws IOException { logger.debug("Closing Elasticsearch client manager"); if (bulkProcessor != null) { try { bulkProcessor.awaitClose(30, TimeUnit.SECONDS); } catch (InterruptedException e) { logger.warn("Did not succeed in closing the bulk processor for documents", e); throw new IOException(e); } } if (client != null) { client.close(); } }
@Override public void close() throws IOException { logger.debug("Closing Elasticsearch client manager"); if (bulkProcessor != null) { try { bulkProcessor.awaitClose(30, TimeUnit.SECONDS); } catch (InterruptedException e) { logger.warn("Did not succeed in closing the bulk processor for documents", e); throw new IOException(e); } } if (client != null) { client.close(); } }
@Override public void cleanup() { if (client != null) try { client.close(); } catch (IOException e) { } }
@Override public void close() { if (client != null) try { client.close(); } catch (IOException e) { } }
@Override public void destroy() throws Exception { restHighLevelClient.close(); }
/** * Close the Elasticsearch connector. * * @throws IOException if problems occur closing the connection. */ public void close() throws IOException { client.close(); } }
public void close() { try { this.restClient.close(); } catch (Exception e) { // } }
public void close() throws IOException { client.close(); }
@Override() public void close() { try { delegate.close(); } catch (Throwable t) { throw new RuntimeException(t); } }
@Override public void destroy() { try { logger.info("Closing Elasticsearch client"); if (client != null) { client.close(); } } catch (final Exception e) { logger.error("Error closing Elasticsearch client: ", e); } }
private void closeClient(RestHighLevelClient client) { try { client.close(); } catch (IOException e) { LOGGER.error("Caught IOException closing ES HTTP Client :: " + e.getMessage()); } }
public void disposes(@Disposes RestHighLevelClient restHighLevelClient) { try { restHighLevelClient.close(); } catch (IOException e) { e.printStackTrace(); } }
public void close() { // First, close the BulkProcessor ensuring pending actions are flushed if (processor != null) { try { boolean success = processor.awaitClose(60, TimeUnit.SECONDS); if (!success) { throw new RuntimeException( "Failed to flush pending actions when closing BulkProcessor"); } } catch (InterruptedException e) { throw new RuntimeException(e); } } // Now close the actual client if (client != null) { try { client.close(); } catch (IOException e) { // ignore silently } } } }
request.addScrollId(scrollId); client.close();