From 201e7969b18f1ffaf3445d99505a82d6aa7b819c Mon Sep 17 00:00:00 2001 From: Ryan McKinley Date: Tue, 16 Dec 2008 19:13:13 +0000 Subject: [PATCH] SOLR-915 - adding docs to CloseHook and making the list a Collection git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@727122 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/solr/core/CloseHook.java | 11 +++++++++++ src/java/org/apache/solr/core/SolrCore.java | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/java/org/apache/solr/core/CloseHook.java b/src/java/org/apache/solr/core/CloseHook.java index 739769d2e4a..46939cdc87b 100644 --- a/src/java/org/apache/solr/core/CloseHook.java +++ b/src/java/org/apache/solr/core/CloseHook.java @@ -29,5 +29,16 @@ package org.apache.solr.core; */ public interface CloseHook { + + /** + * 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. + * + * + * @param core SolrCore object that is shutting down / closing + */ void close( SolrCore core ); } diff --git a/src/java/org/apache/solr/core/SolrCore.java b/src/java/org/apache/solr/core/SolrCore.java index 9678697887a..6692e87b917 100644 --- a/src/java/org/apache/solr/core/SolrCore.java +++ b/src/java/org/apache/solr/core/SolrCore.java @@ -740,7 +740,7 @@ public final class SolrCore implements SolrInfoMBean { } } - private List closeHooks = null; + private Collection closeHooks = null; /** * Add a close callback hook