Interface CloseHook

    • Method Summary

      All Methods Instance Methods Default Methods 
      Modifier and Type Method Description
      default void postClose​(SolrCore core)
      Method called when the given SolrCore object has been shut down and update handlers and searchers are closed
      Use this method for post-close clean up operations e.g.
      default void preClose​(SolrCore core)
      Method called when the given SolrCore object is closing / shutting down but before the update handler and searcher(s) are actually closed
      Important: Keep the method implementation as short as possible.
    • Method Detail

      • preClose

        default void preClose​(SolrCore core)
        Method called when the given SolrCore object is closing / shutting down but before the update handler and searcher(s) are actually closed
        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
      • postClose

        default void postClose​(SolrCore core)
        Method called when the given SolrCore object has been shut down and update handlers and searchers are closed
        Use this method for post-close clean up operations e.g. deleting the index from disk.
        The core's passed to the method is already closed and therefore, its update handler or searcher should *NOT* be used

        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