X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=solr-4.6.0%2Fdocs%2Fsolr-core%2Forg%2Fapache%2Fsolr%2Fcore%2FAbstractSolrEventListener.html;fp=solr-4.6.0%2Fdocs%2Fsolr-core%2Forg%2Fapache%2Fsolr%2Fcore%2FAbstractSolrEventListener.html;h=c6e5071d86e6352799bb30be3b482e6dfede7bdc;hb=984cb2d01d9df08990e216e765a0cd5f2724cff6;hp=0000000000000000000000000000000000000000;hpb=0a506fa4326a039654939ad76e2201a7e4885dbf;p=libre10%2Flibre10.git diff --git a/solr-4.6.0/docs/solr-core/org/apache/solr/core/AbstractSolrEventListener.html b/solr-4.6.0/docs/solr-core/org/apache/solr/core/AbstractSolrEventListener.html new file mode 100644 index 0000000..c6e5071 --- /dev/null +++ b/solr-4.6.0/docs/solr-core/org/apache/solr/core/AbstractSolrEventListener.html @@ -0,0 +1,481 @@ + + + + + + + +AbstractSolrEventListener (Solr 4.6.0 API) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.apache.solr.core +
+Class AbstractSolrEventListener

+
+java.lang.Object
+  extended by org.apache.solr.core.AbstractSolrEventListener
+
+
+
All Implemented Interfaces:
SolrEventListener, NamedListInitializedPlugin
+
+
+
Direct Known Subclasses:
ExternalFileFieldReloader, QuerySenderListener
+
+
+
+
public class AbstractSolrEventListener
extends Object
implements SolrEventListener
+ + +

+


+ +

+ + + + + + + +
+Field Summary
+ + + + + + + +
Fields inherited from interface org.apache.solr.core.SolrEventListener
log
+  + + + + + + + + + + +
+Constructor Summary
AbstractSolrEventListener(SolrCore core) + +
+           
+  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+protected  NamedListaddEventParms(SolrIndexSearcher currentSearcher, + NamedList nlst) + +
+          Add the EventParams.EVENT with either the EventParams.NEW_SEARCHER + or EventParams.FIRST_SEARCHER values depending on the value of currentSearcher.
+ NamedListgetArgs() + +
+           
+ SolrCoregetCore() + +
+           
+ voidinit(NamedList args) + +
+           
+ 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() + +
+           
+ StringtoString() + +
+           
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
+  +

+ + + + + + + + +
+Constructor Detail
+ +

+AbstractSolrEventListener

+
+public AbstractSolrEventListener(SolrCore core)
+
+
+ + + + + + + + +
+Method Detail
+ +

+getCore

+
+public SolrCore getCore()
+
+
+
+
+
+
+
+
+
+ +

+getArgs

+
+public NamedList getArgs()
+
+
+
+
+
+
+
+
+
+ +

+init

+
+public void init(NamedList args)
+
+
+
Specified by:
init in interface NamedListInitializedPlugin
+
+
+
+
+
+
+ +

+postCommit

+
+public void postCommit()
+
+
+
Specified by:
postCommit in interface SolrEventListener
+
+
+
+
+
+
+ +

+postSoftCommit

+
+public void postSoftCommit()
+
+
+
Specified by:
postSoftCommit in interface SolrEventListener
+
+
+
+
+
+
+ +

+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: +

+ + Sample: +
+    if (currentSearcher != null) {
+      nlst.add(CommonParams.EVENT, CommonParams.NEW_SEARCHER);
+    } else {
+      nlst.add(CommonParams.EVENT, CommonParams.FIRST_SEARCHER);
+    }
+
+ 
+

+

+
Specified by:
newSearcher in interface SolrEventListener
+
+
+
Parameters:
newSearcher - The new SolrIndexSearcher to use
currentSearcher - The existing SolrIndexSearcher. null if this is a firstSearcher event.
See Also:
addEventParms(org.apache.solr.search.SolrIndexSearcher, org.apache.solr.common.util.NamedList)
+
+
+
+ +

+toString

+
+public String toString()
+
+
+
Overrides:
toString in class Object
+
+
+
+
+
+
+ +

+addEventParms

+
+protected NamedList addEventParms(SolrIndexSearcher currentSearcher,
+                                  NamedList nlst)
+
+
Add the EventParams.EVENT with either the EventParams.NEW_SEARCHER + or EventParams.FIRST_SEARCHER values depending on the value of currentSearcher. +

+ Makes a copy of NamedList and then adds the parameters. +

+

+
+
+
+
Parameters:
currentSearcher - If null, add FIRST_SEARCHER, otherwise NEW_SEARCHER
nlst - The named list to add the EVENT value to
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved. + + + + +