class RunExecutableListener extends AbstractSolrEventListener
Modifier and Type | Field and Description |
---|---|
protected java.lang.String[] |
cmd |
protected java.io.File |
dir |
protected java.lang.String[] |
envp |
private static int |
INVALID_PROCESS_RETURN_CODE
Non-zero value for an invalid return code
|
protected boolean |
wait |
args, core
log
Constructor and Description |
---|
RunExecutableListener(SolrCore core) |
Modifier and Type | Method and Description |
---|---|
protected int |
exec(java.lang.String callback)
External executable listener.
|
void |
init(NamedList args) |
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() |
addEventParms, toString
protected java.lang.String[] cmd
protected java.io.File dir
protected java.lang.String[] envp
protected boolean wait
private static int INVALID_PROCESS_RETURN_CODE
public RunExecutableListener(SolrCore core)
public void init(NamedList args)
init
in interface NamedListInitializedPlugin
init
in class AbstractSolrEventListener
protected int exec(java.lang.String callback)
callback
- Unused (As of solr 1.4-dev)public void postCommit()
postCommit
in interface SolrEventListener
postCommit
in class AbstractSolrEventListener
public void newSearcher(SolrIndexSearcher newSearcher, SolrIndexSearcher currentSearcher)
SolrEventListener
EventParams.EVENT
parameter and set it to a value of either:
EventParams.FIRST_SEARCHER
- First Searcher eventEventParams.NEW_SEARCHER
- New Searcher eventif (currentSearcher != null) { nlst.add(CommonParams.EVENT, CommonParams.NEW_SEARCHER); } else { nlst.add(CommonParams.EVENT, CommonParams.FIRST_SEARCHER); }
newSearcher
in interface SolrEventListener
newSearcher
in class AbstractSolrEventListener
newSearcher
- The new SolrIndexSearcher
to usecurrentSearcher
- The existing SolrIndexSearcher
. null if this is a firstSearcher event.AbstractSolrEventListener.addEventParms(org.apache.solr.search.SolrIndexSearcher, org.apache.solr.common.util.NamedList)