org.apache.solr.client.solrj.request
Class SolrPing

java.lang.Object
  extended by org.apache.solr.client.solrj.SolrRequest
      extended by org.apache.solr.client.solrj.request.SolrPing
All Implemented Interfaces:
Serializable

public class SolrPing
extends SolrRequest

Verify that there is a working Solr core at the URL of a SolrServer. 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:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.solr.client.solrj.SolrRequest
SolrRequest.METHOD
 
Constructor Summary
SolrPing()
          Create a new SolrPing object.
 
Method Summary
 Collection<ContentStream> getContentStreams()
           
 ModifiableSolrParams getParams()
           
 SolrPingResponse process(SolrServer server)
           
 SolrPing removeAction()
          Remove the action parameter from this request.
 SolrPing setActionDisable()
          Set the action parameter on this request to enable.
 SolrPing setActionEnable()
          Set the action parameter on this request to enable.
 SolrPing setActionPing()
          Set the action parameter on this request to ping.
 
Methods inherited from class org.apache.solr.client.solrj.SolrRequest
getMethod, getPath, getResponseParser, getStreamingResponseCallback, setMethod, setPath, setResponseParser, setStreamingResponseCallback
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SolrPing

public SolrPing()
Create a new SolrPing object.

Method Detail

getContentStreams

public Collection<ContentStream> getContentStreams()
Specified by:
getContentStreams in class SolrRequest

getParams

public ModifiableSolrParams getParams()
Specified by:
getParams in class SolrRequest

process

public SolrPingResponse process(SolrServer server)
                         throws SolrServerException,
                                IOException
Specified by:
process in class SolrRequest
Throws:
SolrServerException
IOException

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


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