added docs

This commit is contained in:
Noble Paul 2017-05-24 15:59:00 +09:30
parent 872ed81cc9
commit 8f4d72a7d2
1 changed files with 26 additions and 16 deletions

View File

@ -39,48 +39,48 @@ import java.util.Map;
public interface SolrQueryRequest extends AutoCloseable {
/** returns the current request parameters */
public SolrParams getParams();
SolrParams getParams();
/** Change the parameters for this request. This does not affect
* the original parameters returned by getOriginalParams()
*/
public void setParams(SolrParams params);
void setParams(SolrParams params);
/** A Collection of ContentStreams passed to the request
*/
public Iterable<ContentStream> getContentStreams();
Iterable<ContentStream> getContentStreams();
/** Returns the original request parameters. As this
* does not normally include configured defaults
* it's more suitable for logging.
*/
public SolrParams getOriginalParams();
SolrParams getOriginalParams();
/**
* Generic information associated with this request that may be both read and updated.
*/
public Map<Object,Object> getContext();
Map<Object,Object> getContext();
/**
* This method should be called when all uses of this request are
* finished, so that resources can be freed.
*/
public void close();
void close();
/** The start time of this request in milliseconds.
* Use this only if you need the absolute system time at the start of the request,
* getRequestTimer() provides a more accurate mechanism for timing purposes.
*/
public long getStartTime();
long getStartTime();
/** The timer for this request, created when the request started being processed */
public RTimerTree getRequestTimer();
RTimerTree getRequestTimer();
/** The index searcher associated with this request */
public SolrIndexSearcher getSearcher();
SolrIndexSearcher getSearcher();
/** The solr core (coordinator, etc) associated with this request */
public SolrCore getCore();
SolrCore getCore();
/** The schema snapshot from core.getLatestSchema() at request creation. */
public IndexSchema getSchema();
@ -97,20 +97,30 @@ public interface SolrQueryRequest extends AutoCloseable {
/** Returns any associated JSON (or null if none) in deserialized generic form.
* Java classes used to represent the JSON are as follows: Map, List, String, Long, Double, Boolean
*/
public Map<String,Object> getJSON();
Map<String,Object> getJSON();
public void setJSON(Map<String,Object> json);
void setJSON(Map<String, Object> json);
public Principal getUserPrincipal();
Principal getUserPrincipal();
default String getPath() {
return (String) getContext().get("path");
}
/** Only for V2 API.
* Returns a map of path segments and their values . For example ,
* if the path is configured as /path/{segment1}/{segment2} and a reguest is made
* as /path/x/y the returned map would contain {segment1:x ,segment2:y}
*/
default Map<String, String> getPathTemplateValues() {
return Collections.emptyMap();
}
/** Only for v2 API
* if the request contains a command payload, it's parsed and returned as a list of
* CommandOperation objects
* @param validateInput , If true it is validated against the json schema spec
*/
default List<CommandOperation> getCommands(boolean validateInput) {
return Collections.emptyList();
}