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
ASolrEventListener
wrapper 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 void
newSearcher(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.void
postCommit()
void
postSoftCommit()
-
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:
postCommit
in interfaceSolrEventListener
-
postSoftCommit
public void postSoftCommit()
- Specified by:
postSoftCommit
in interfaceSolrEventListener
-
newSearcher
public void newSearcher(SolrIndexSearcher newSearcher, SolrIndexSearcher currentSearcher)
Description copied from interface:SolrEventListener
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.Implementations should add the
EventParams.EVENT
parameter 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:
newSearcher
in interfaceSolrEventListener
- Parameters:
newSearcher
- The newSolrIndexSearcher
to 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)
-
-