org.apache.solr.core
Class RequestHandlers.LazyRequestHandlerWrapper

java.lang.Object
  extended by org.apache.solr.core.RequestHandlers.LazyRequestHandlerWrapper
All Implemented Interfaces:
SolrInfoMBean, SolrRequestHandler
Enclosing class:
RequestHandlers

public static final class RequestHandlers.LazyRequestHandlerWrapper
extends Object
implements SolrRequestHandler

The LazyRequestHandlerWrapper wraps any SolrRequestHandler. Rather then instantiate and initialize the handler on startup, this wrapper waits until it is actually called. This should only be used for handlers that are unlikely to be used in the normal lifecycle. You can enable lazy loading in solrconfig.xml using:

  <requestHandler name="..." class="..." startup="lazy">
    ...
  </requestHandler>
 
This is a private class - if there is a real need for it to be public, it could move

Since:
solr 1.2

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.solr.core.SolrInfoMBean
SolrInfoMBean.Category
 
Constructor Summary
RequestHandlers.LazyRequestHandlerWrapper(SolrCore core, String className, NamedList args)
           
 
Method Summary
 SolrInfoMBean.Category getCategory()
          Purpose of this Class
 String getDescription()
          Simple one or two line description
 URL[] getDocs()
          Documentation URL list.
 String getHandlerClass()
           
 String getName()
          Simple common usage name, e.g.
 String getSource()
          CVS Source, SVN Source, etc
 NamedList getStatistics()
          Any statistics this instance would like to be publicly available via the Solr Administration interface.
 String getVersion()
          Simple common usage version, e.g.
 SolrRequestHandler getWrappedHandler()
           
 void handleRequest(SolrQueryRequest req, SolrQueryResponse rsp)
          Wait for the first request before initializing the wrapped handler
 void init(NamedList args)
          In normal use, this function will not be called
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RequestHandlers.LazyRequestHandlerWrapper

public RequestHandlers.LazyRequestHandlerWrapper(SolrCore core,
                                                 String className,
                                                 NamedList args)
Method Detail

init

public void init(NamedList args)
In normal use, this function will not be called

Specified by:
init in interface SolrRequestHandler

handleRequest

public void handleRequest(SolrQueryRequest req,
                          SolrQueryResponse rsp)
Wait for the first request before initializing the wrapped handler

Specified by:
handleRequest in interface SolrRequestHandler

getWrappedHandler

public SolrRequestHandler getWrappedHandler()

getHandlerClass

public String getHandlerClass()

getName

public String getName()
Description copied from interface: SolrInfoMBean
Simple common usage name, e.g. BasicQueryHandler, or fully qualified clas name.

Specified by:
getName in interface SolrInfoMBean

getDescription

public String getDescription()
Description copied from interface: SolrInfoMBean
Simple one or two line description

Specified by:
getDescription in interface SolrInfoMBean

getVersion

public String getVersion()
Description copied from interface: SolrInfoMBean
Simple common usage version, e.g. 2.0

Specified by:
getVersion in interface SolrInfoMBean

getSource

public String getSource()
Description copied from interface: SolrInfoMBean
CVS Source, SVN Source, etc

Specified by:
getSource in interface SolrInfoMBean

getDocs

public URL[] getDocs()
Description copied from interface: SolrInfoMBean
Documentation URL list.

Suggested documentation URLs: Homepage for sponsoring project, FAQ on class usage, Design doc for class, Wiki, bug reporting URL, etc...

Specified by:
getDocs in interface SolrInfoMBean

getCategory

public SolrInfoMBean.Category getCategory()
Description copied from interface: SolrInfoMBean
Purpose of this Class

Specified by:
getCategory in interface SolrInfoMBean

getStatistics

public NamedList getStatistics()
Description copied from interface: SolrInfoMBean
Any statistics this instance would like to be publicly available via the Solr Administration interface.

Any Object type may be stored in the list, but only the toString() representation will be used.

Specified by:
getStatistics in interface SolrInfoMBean


Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.