org.apache.solr.handler.component

## Class HttpShardHandler

- java.lang.Object
- - org.apache.solr.handler.component.ShardHandler
  - - org.apache.solr.handler.component.HttpShardHandler

-     public class HttpShardHandler
      extends ShardHandler

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `HttpShardHandler(HttpShardHandlerFactory httpShardHandlerFactory, org.apache.http.client.HttpClient httpClient)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    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)`
    `void` | `submit(ShardRequest sreq, String shard, ModifiableSolrParams params, String preferredHostAddress)`
    `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

    - ### Methods inherited from class org.apache.solr.handler.component.ShardHandler

      `submit`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### HttpShardHandler

          public HttpShardHandler(HttpShardHandlerFactory httpShardHandlerFactory,
                                  org.apache.http.client.HttpClient httpClient)

  - ### Method Detail

    - #### submit

          public void submit(ShardRequest sreq,
                             String shard,
                             ModifiableSolrParams params,
                             String preferredHostAddress)

      Specified by:
        `submit` in class `ShardHandler`

    - #### makeQueryRequest

          protected QueryRequest makeQueryRequest(ShardRequest sreq,
                                                  ModifiableSolrParams params,
                                                  String shard)

      Subclasses could modify the request based on the shard

    - #### transfomResponse

          protected ShardResponse transfomResponse(ShardRequest sreq,
                                                   ShardResponse rsp,
                                                   String shard)

      Subclasses could modify the Response based on the the shard

    - #### takeCompletedIncludingErrors

          public ShardResponse takeCompletedIncludingErrors()

      returns a ShardResponse of the last response correlated with a ShardRequest. This won't return early if it runs into an error.
      Specified by:
        `takeCompletedIncludingErrors` in class `ShardHandler`

    - #### takeCompletedOrError

          public ShardResponse takeCompletedOrError()

      returns a ShardResponse of the last response correlated with a ShardRequest, or immediately returns a ShardResponse if there was an error detected
      Specified by:
        `takeCompletedOrError` in class `ShardHandler`

    - #### cancelAll

          public void cancelAll()

      Specified by:
        `cancelAll` in class `ShardHandler`

    - #### prepDistributed

          public void prepDistributed(ResponseBuilder rb)

      Specified by:
        `prepDistributed` in class `ShardHandler`

    - #### getShardHandlerFactory

          public ShardHandlerFactory getShardHandlerFactory()

      Specified by:
        `getShardHandlerFactory` in class `ShardHandler`

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