@Override public void dispose() throws ComponentLifecycleException { this.cores.shutdown(); } }
public void destroy() { if (cores != null) { cores.shutdown(); cores = null; } }
public void shutdown() { if (container != null) { container.shutdown(); } } }
@Override public void dispose() throws ComponentLifecycleException { this.cores.shutdown(); } }
/** * Shuts down the embedded solr server by forwarding the shutdown command to the {@link CoreContainer}. */ public void shutdown() { if (coreContainer != null) coreContainer.shutdown(); }
private void shutdown() { server.shutdown(); }
private void shutdown() { server.shutdown(); }
public void shutdown() { container.shutdown(); }
public void shutdownSolrServer() { if (coreContainer.get() != null) { coreContainer.get().shutdown(); } }
@Override protected void finalize() throws Throwable { try { if(!isShutDown){ log.error("CoreContainer was not shutdown prior to finalize(), indicates a bug -- POSSIBLE RESOURCE LEAK!!!"); shutdown(); } } finally { super.finalize(); } }
/** * Shutdown function for cleaning up instantiated object. * */ public void shutdown() { if (reader != null) { try { reader.close(); } catch (IOException ex) { log.error("Error shutting down the Reader!", ex); } } if (solrContainer != null) { solrContainer.shutdown(); } }
@Override public void dispose() throws ComponentLifecycleException { if (this.server != null) { try { this.server.close(); } catch (IOException e) { this.logger.error("Failed to close server", e); } } if (this.container != null) { this.container.shutdown(); } }
public void cleanup() throws IOException { flushInputDocuments(true); _coreContainer.shutdown(); _solrServer = null; }
@Override public final void shutdown() throws IOException { Preconditions.checkState(Objects.nonNull(this.coreContainer), "Not initialized!"); try { final CoreContainer cc = this.coreContainer; this.coreContainer = null; cc.shutdown(); } catch (final Throwable t) { log.error("Unexpected Error during CoreContainer.shutdown(): {}", t.getMessage()); throw t; } if (deleteOnShutdown) { log.debug("Cleaning up solr-home {}", solrHome); PathUtils.deleteRecursive(solrHome); } }
@Override public Bootstrap stop() { if (state == State.STARTED) { state = State.STOPPING; LOGGER.info("{} is stopping", this.getClass().getName()); if (this.solrServer != null && solrServer.getCoreContainer() != null) { solrServer.getCoreContainer().shutdown(); } state = State.STOPPED; LOGGER.info("{} is stopped", this.getClass().getName()); } return this; }
public void buildSuccess(IndexBuilderEvent event) { final long indexEnd = System.currentTimeMillis(); String total = new DecimalFormat("#.##").format( (indexEnd - indexStart) / 60000); System.out.println( "Index built successfully in " + total + " mins."); try { builder.shutdown(); solrContainer.shutdown(); } catch (IndexBuilderException e) { e.printStackTrace(); } }
@Override public void passivateSolr() throws Exception { core.closeSearcher(); coreContainer.shutdown(); // Clear instance fields for GC purposes Field instanceField = SolrCore.class.getDeclaredField( "instance" ); accessible( instanceField ).set( null, null ); SolrConfig.config = null; }
public void buildError(IndexBuilderEvent event) { System.out.println("Index failed to build"); for (Throwable t : event.getErrors()) { t.printStackTrace(); } try { builder.shutdown(); solrContainer.shutdown(); } catch (IndexBuilderException e) { e.printStackTrace(); } }
/** * Shuts down and frees any resources */ public void close() { if (container != null) { for (SolrCore c : container.getCores()) { if (c.getOpenCount() > 1) throw new RuntimeException("SolrCore.getOpenCount()=="+core.getOpenCount()); } } if (container != null) { container.shutdown(); container = null; } }
/** * Shuts down and frees any resources */ public void close() { if (container != null) { for (SolrCore c : container.getCores()) { if (c.getOpenCount() > 1) throw new RuntimeException("SolrCore.getOpenCount()=="+c.getOpenCount()); } } if (container != null) { container.shutdown(); container = null; } }