Package org.apache.solr.core
Class DelegatingEventListener
- java.lang.Object
-
- org.apache.solr.core.DelegatingEventListener
-
- All Implemented Interfaces:
SolrEventListener,NamedListInitializedPlugin
public class DelegatingEventListener extends Object implements SolrEventListener
ASolrEventListenerwrapper that loads class from a package and reload if it's modified
-
-
Constructor Summary
Constructors Constructor Description DelegatingEventListener(PackagePluginHolder<SolrEventListener> holder)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidnewSearcher(SolrIndexSearcher newSearcher, SolrIndexSearcher currentSearcher)The searchers passed here are only guaranteed to be valid for the duration of this method call, so care should be taken not to spawn threads or asynchronous tasks with references to these searchers.voidpostCommit()voidpostSoftCommit()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.solr.util.plugin.NamedListInitializedPlugin
init
-
-
-
-
Constructor Detail
-
DelegatingEventListener
public DelegatingEventListener(PackagePluginHolder<SolrEventListener> holder)
-
-
Method Detail
-
postCommit
public void postCommit()
- Specified by:
postCommitin interfaceSolrEventListener
-
postSoftCommit
public void postSoftCommit()
- Specified by:
postSoftCommitin interfaceSolrEventListener
-
newSearcher
public void newSearcher(SolrIndexSearcher newSearcher, SolrIndexSearcher currentSearcher)
Description copied from interface:SolrEventListenerThe searchers passed here are only guaranteed to be valid for the duration of this method call, so care should be taken not to spawn threads or asynchronous tasks with references to these searchers.Implementations should add the
EventParams.EVENTparameter and set it to a value of either:EventParams.FIRST_SEARCHER- First Searcher eventEventParams.NEW_SEARCHER- New Searcher event
if (currentSearcher != null) { nlst.add(CommonParams.EVENT, CommonParams.NEW_SEARCHER); } else { nlst.add(CommonParams.EVENT, CommonParams.FIRST_SEARCHER); }- Specified by:
newSearcherin interfaceSolrEventListener- Parameters:
newSearcher- The newSolrIndexSearcherto usecurrentSearcher- The existingSolrIndexSearcher. null if this is a firstSearcher event.- See Also:
AbstractSolrEventListener.addEventParms(org.apache.solr.search.SolrIndexSearcher, org.apache.solr.common.util.NamedList)
-
-