org.apache.solr.request
Class SolrQueryRequestBase

java.lang.Object
  extended by org.apache.solr.request.SolrQueryRequestBase
All Implemented Interfaces:
SolrQueryRequest
Direct Known Subclasses:
LocalSolrQueryRequest

public abstract class SolrQueryRequestBase
extends Object
implements SolrQueryRequest

Base implementation of SolrQueryRequest that provides some convenience methods for accessing parameters, and manages an IndexSearcher reference.

The close() method must be called on any instance of this class once it is no longer in use.


Field Summary
protected  Map<Object,Object> context
           
protected  SolrCore core
           
protected  SolrParams origParams
           
protected  SolrParams params
           
protected  RefCounted<SolrIndexSearcher> searcherHolder
           
protected  long startTime
           
protected  Iterable<ContentStream> streams
           
 
Constructor Summary
SolrQueryRequestBase(SolrCore core, SolrParams params)
           
 
Method Summary
 void close()
          Frees resources associated with this request, this method must be called when the object is no longer in use.
 Iterable<ContentStream> getContentStreams()
          A Collection of ContentStreams passed to the request
 Map<Object,Object> getContext()
          Generic information associated with this request that may be both read and updated.
 SolrCore getCore()
          The solr core (coordinator, etc) associated with this request
 SolrParams getOriginalParams()
          Returns the original request parameters.
 SolrParams getParams()
          returns the current request parameters
 String getParamString()
          Returns a string representing all the important parameters.
 IndexSchema getSchema()
          The index schema associated with this request
 SolrIndexSearcher getSearcher()
          The index searcher associated with this request
 long getStartTime()
          The start time of this request in milliseconds
 void setContentStreams(Iterable<ContentStream> s)
           
 void setParams(SolrParams params)
          Change the parameters for this request.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

core

protected final SolrCore core

origParams

protected final SolrParams origParams

params

protected SolrParams params

context

protected Map<Object,Object> context

streams

protected Iterable<ContentStream> streams

startTime

protected final long startTime

searcherHolder

protected RefCounted<SolrIndexSearcher> searcherHolder
Constructor Detail

SolrQueryRequestBase

public SolrQueryRequestBase(SolrCore core,
                            SolrParams params)
Method Detail

getContext

public Map<Object,Object> getContext()
Description copied from interface: SolrQueryRequest
Generic information associated with this request that may be both read and updated.

Specified by:
getContext in interface SolrQueryRequest

getParams

public SolrParams getParams()
Description copied from interface: SolrQueryRequest
returns the current request parameters

Specified by:
getParams in interface SolrQueryRequest

getOriginalParams

public SolrParams getOriginalParams()
Description copied from interface: SolrQueryRequest
Returns the original request parameters. As this does not normally include configured defaults it's more suitable for logging.

Specified by:
getOriginalParams in interface SolrQueryRequest

setParams

public void setParams(SolrParams params)
Description copied from interface: SolrQueryRequest
Change the parameters for this request. This does not affect the original parameters returned by getOriginalParams()

Specified by:
setParams in interface SolrQueryRequest

getStartTime

public long getStartTime()
Description copied from interface: SolrQueryRequest
The start time of this request in milliseconds

Specified by:
getStartTime in interface SolrQueryRequest

getSearcher

public SolrIndexSearcher getSearcher()
Description copied from interface: SolrQueryRequest
The index searcher associated with this request

Specified by:
getSearcher in interface SolrQueryRequest

getCore

public SolrCore getCore()
Description copied from interface: SolrQueryRequest
The solr core (coordinator, etc) associated with this request

Specified by:
getCore in interface SolrQueryRequest

getSchema

public IndexSchema getSchema()
Description copied from interface: SolrQueryRequest
The index schema associated with this request

Specified by:
getSchema in interface SolrQueryRequest

close

public void close()
Frees resources associated with this request, this method must be called when the object is no longer in use.

Specified by:
close in interface SolrQueryRequest

getContentStreams

public Iterable<ContentStream> getContentStreams()
A Collection of ContentStreams passed to the request

Specified by:
getContentStreams in interface SolrQueryRequest

setContentStreams

public void setContentStreams(Iterable<ContentStream> s)

getParamString

public String getParamString()
Description copied from interface: SolrQueryRequest
Returns a string representing all the important parameters. Suitable for logging.

Specified by:
getParamString in interface SolrQueryRequest

toString

public String toString()
Overrides:
toString in class Object


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