org.apache.solr.core
Interface CloseHook


public interface CloseHook

Interface to request notification when the core is closed.

Call SolrCore.addCloseHook(org.apache.solr.core.CloseHook) during the SolrCoreAware.inform(SolrCore) method to add a close hook to your object.

The close hook can be useful for releasing objects related to the request handler (for instance, if you have a JDBC DataSource or something like that)


Method Summary
 void close(SolrCore core)
          Method called when the given SolrCore object is closing / shutting down.
 

Method Detail

close

void close(SolrCore core)
Method called when the given SolrCore object is closing / shutting down.
Important: Keep the method implementation as short as possible. If it were to use any heavy i/o , network connections - it might be a better idea to launch in a separate Thread so as to not to block the process of shutting down a given SolrCore instance.

Parameters:
core - SolrCore object that is shutting down / closing


Copyright © 2011 Apache Software Foundation. All Rights Reserved.