mirror of
https://github.com/apache/lucene.git
synced 2025-02-28 05:19:17 +00:00
SOLR-605 -- adding thread safety comment
git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@674619 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
317196a069
commit
3d1ce65a6e
@ -44,6 +44,7 @@ import org.apache.solr.update.processor.UpdateRequestProcessorFactory;
|
|||||||
import org.apache.solr.util.RefCounted;
|
import org.apache.solr.util.RefCounted;
|
||||||
import org.apache.solr.util.plugin.AbstractPluginLoader;
|
import org.apache.solr.util.plugin.AbstractPluginLoader;
|
||||||
import org.apache.solr.util.plugin.NamedListPluginLoader;
|
import org.apache.solr.util.plugin.NamedListPluginLoader;
|
||||||
|
import org.apache.solr.util.plugin.SolrCoreAware;
|
||||||
import org.w3c.dom.Node;
|
import org.w3c.dom.Node;
|
||||||
import org.w3c.dom.NodeList;
|
import org.w3c.dom.NodeList;
|
||||||
import org.xml.sax.SAXException;
|
import org.xml.sax.SAXException;
|
||||||
@ -207,16 +208,37 @@ public final class SolrCore {
|
|||||||
newSearcherListeners = parseListener("//listener[@event=\"newSearcher\"]");
|
newSearcherListeners = parseListener("//listener[@event=\"newSearcher\"]");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* NOTE: this function is not thread safe. However, it is safe to call within the
|
||||||
|
* <code>inform( SolrCore core )</code> function for <code>SolrCoreAware</code> classes.
|
||||||
|
* Outside <code>inform</code>, this could potentially throw a ConcurrentModificationException
|
||||||
|
*
|
||||||
|
* @see SolrCoreAware
|
||||||
|
*/
|
||||||
public void registerFirstSearcherListener( SolrEventListener listener )
|
public void registerFirstSearcherListener( SolrEventListener listener )
|
||||||
{
|
{
|
||||||
firstSearcherListeners.add( listener );
|
firstSearcherListeners.add( listener );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* NOTE: this function is not thread safe. However, it is safe to call within the
|
||||||
|
* <code>inform( SolrCore core )</code> function for <code>SolrCoreAware</code> classes.
|
||||||
|
* Outside <code>inform</code>, this could potentially throw a ConcurrentModificationException
|
||||||
|
*
|
||||||
|
* @see SolrCoreAware
|
||||||
|
*/
|
||||||
public void registerNewSearcherListener( SolrEventListener listener )
|
public void registerNewSearcherListener( SolrEventListener listener )
|
||||||
{
|
{
|
||||||
newSearcherListeners.add( listener );
|
newSearcherListeners.add( listener );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* NOTE: this function is not thread safe. However, it is safe to call within the
|
||||||
|
* <code>inform( SolrCore core )</code> function for <code>SolrCoreAware</code> classes.
|
||||||
|
* Outside <code>inform</code>, this could potentially throw a ConcurrentModificationException
|
||||||
|
*
|
||||||
|
* @see SolrCoreAware
|
||||||
|
*/
|
||||||
public void registerResponseWriter( String name, QueryResponseWriter responseWriter ){
|
public void registerResponseWriter( String name, QueryResponseWriter responseWriter ){
|
||||||
responseWriters.put(name, responseWriter);
|
responseWriters.put(name, responseWriter);
|
||||||
}
|
}
|
||||||
|
@ -179,11 +179,25 @@ public abstract class UpdateHandler implements SolrInfoMBean {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* NOTE: this function is not thread safe. However, it is safe to call within the
|
||||||
|
* <code>inform( SolrCore core )</code> function for <code>SolrCoreAware</code> classes.
|
||||||
|
* Outside <code>inform</code>, this could potentially throw a ConcurrentModificationException
|
||||||
|
*
|
||||||
|
* @see SolrCoreAware
|
||||||
|
*/
|
||||||
public void registerCommitCallback( SolrEventListener listener )
|
public void registerCommitCallback( SolrEventListener listener )
|
||||||
{
|
{
|
||||||
commitCallbacks.add( listener );
|
commitCallbacks.add( listener );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* NOTE: this function is not thread safe. However, it is safe to call within the
|
||||||
|
* <code>inform( SolrCore core )</code> function for <code>SolrCoreAware</code> classes.
|
||||||
|
* Outside <code>inform</code>, this could potentially throw a ConcurrentModificationException
|
||||||
|
*
|
||||||
|
* @see SolrCoreAware
|
||||||
|
*/
|
||||||
public void registerOptimizeCallback( SolrEventListener listener )
|
public void registerOptimizeCallback( SolrEventListener listener )
|
||||||
{
|
{
|
||||||
optimizeCallbacks.add( listener );
|
optimizeCallbacks.add( listener );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user