Class SolrPing

All Implemented Interfaces:
Serializable

public class SolrPing extends CollectionRequiringSolrRequest<SolrPingResponse>
Verify that there is a working Solr core at the URL of a SolrClient. To use this class, the solrconfig.xml for the relevant core must include the request handler for /admin/ping.
Since:
solr 1.3
See Also:
  • Constructor Details

    • SolrPing

      public SolrPing()
      Create a new SolrPing object.
  • Method Details

    • createResponse

      protected SolrPingResponse createResponse(NamedList<Object> namedList)
      Description copied from class: SolrRequest
      Create a new SolrResponse to hold the response from the server. If the response extends SolrResponse, then there's no need to use the arguments, as SolrResponse.setResponse(NamedList) will be called right after this method.
      Specified by:
      createResponse in class SolrRequest<SolrPingResponse>
      Parameters:
      namedList - from SolrClient.request(SolrRequest, String).
    • getParams

      public ModifiableSolrParams getParams()
      Description copied from class: SolrRequest
      The parameters for this request; never null. The runtime type may be mutable but modifications may not affect this SolrRequest instance, as it may return a new instance here every time. If the subclass specifies the response type as ModifiableSolrParams, then one can expect it to change this request. If the subclass has a setter then one can expect this method to return the value set.
      Specified by:
      getParams in class SolrRequest<SolrPingResponse>
    • removeAction

      public SolrPing removeAction()
      Remove the action parameter from this request. This will result in the same behavior as SolrPing#setActionPing(). For Solr server version 4.0 and later.
      Returns:
      this
    • setActionDisable

      public SolrPing setActionDisable()
      Set the action parameter on this request to enable. This will delete the health-check file for the Solr core. For Solr server version 4.0 and later.
      Returns:
      this
    • setActionEnable

      public SolrPing setActionEnable()
      Set the action parameter on this request to enable. This will create the health-check file for the Solr core. For Solr server version 4.0 and later.
      Returns:
      this
    • setActionPing

      public SolrPing setActionPing()
      Set the action parameter on this request to ping. This is the same as not including the action at all. For Solr server version 4.0 and later.
      Returns:
      this