@SolrThreadUnsafe public class HttpShardHandler extends ShardHandler
| Modifier and Type | Field and Description |
|---|---|
static String |
ONLY_NRT_REPLICAS
If the request context map has an entry with this key and Boolean.TRUE as value,
prepDistributed(ResponseBuilder) will only include Replica.Type.NRT replicas as possible
destination of the distributed request (or a leader replica of type Replica.Type.TLOG). |
| Constructor and Description |
|---|
HttpShardHandler(HttpShardHandlerFactory httpShardHandlerFactory,
Http2SolrClient httpClient) |
| Modifier and Type | Method and Description |
|---|---|
void |
cancelAll() |
ShardHandlerFactory |
getShardHandlerFactory() |
protected QueryRequest |
makeQueryRequest(ShardRequest sreq,
ModifiableSolrParams params,
String shard)
Subclasses could modify the request based on the shard
|
void |
prepDistributed(ResponseBuilder rb) |
protected NamedList<Object> |
request(String url,
SolrRequest req) |
void |
submit(ShardRequest sreq,
String shard,
ModifiableSolrParams params) |
ShardResponse |
takeCompletedIncludingErrors()
returns a ShardResponse of the last response correlated with a ShardRequest.
|
ShardResponse |
takeCompletedOrError()
returns a ShardResponse of the last response correlated with a ShardRequest,
or immediately returns a ShardResponse if there was an error detected
|
protected ShardResponse |
transfomResponse(ShardRequest sreq,
ShardResponse rsp,
String shard)
Subclasses could modify the Response based on the the shard
|
public static String ONLY_NRT_REPLICAS
prepDistributed(ResponseBuilder) will only include Replica.Type.NRT replicas as possible
destination of the distributed request (or a leader replica of type Replica.Type.TLOG). This is used
by the RealtimeGet handler, since other types of replicas shouldn't respond to RTG requestspublic HttpShardHandler(HttpShardHandlerFactory httpShardHandlerFactory, Http2SolrClient httpClient)
public void submit(ShardRequest sreq, String shard, ModifiableSolrParams params)
submit in class ShardHandlerprotected NamedList<Object> request(String url, SolrRequest req) throws IOException, SolrServerException
IOExceptionSolrServerExceptionprotected QueryRequest makeQueryRequest(ShardRequest sreq, ModifiableSolrParams params, String shard)
protected ShardResponse transfomResponse(ShardRequest sreq, ShardResponse rsp, String shard)
public ShardResponse takeCompletedIncludingErrors()
takeCompletedIncludingErrors in class ShardHandlerpublic ShardResponse takeCompletedOrError()
takeCompletedOrError in class ShardHandlerpublic void cancelAll()
cancelAll in class ShardHandlerpublic void prepDistributed(ResponseBuilder rb)
prepDistributed in class ShardHandlerpublic ShardHandlerFactory getShardHandlerFactory()
getShardHandlerFactory in class ShardHandlerCopyright © 2000-2021 Apache Software Foundation. All Rights Reserved.