Class SolrPing
- java.lang.Object
-
- org.apache.solr.client.solrj.SolrRequest<SolrPingResponse>
-
- org.apache.solr.client.solrj.request.SolrPing
-
- All Implemented Interfaces:
Serializable
public class SolrPing extends SolrRequest<SolrPingResponse>
Verify that there is a working Solr core at the URL of aSolrClient
. 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, SolrRequest.SolrClientContext, SolrRequest.SolrRequestType
-
-
Field Summary
-
Fields inherited from class org.apache.solr.client.solrj.SolrRequest
SUPPORTED_METHODS, useBinaryV2, usev2
-
-
Constructor Summary
Constructors Constructor Description SolrPing()
Create a new SolrPing object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected SolrPingResponse
createResponse(SolrClient client)
Create a new SolrResponse to hold the response from the serverModifiableSolrParams
getParams()
String
getRequestType()
This method defines the type of this Solr request.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
addHeader, getBasePath, getBasicAuthPassword, getBasicAuthUser, getCollection, getContentStreams, getContentWriter, getHeaders, getMethod, getPath, getQueryParams, getResponseParser, getStreamingResponseCallback, getUserPrincipal, process, process, setBasePath, setBasicAuthCredentials, setMethod, setPath, setQueryParams, setResponseParser, setStreamingResponseCallback, setUseBinaryV2, setUserPrincipal, setUseV2
-
-
-
-
Method Detail
-
createResponse
protected SolrPingResponse createResponse(SolrClient client)
Description copied from class:SolrRequest
Create a new SolrResponse to hold the response from the server- Specified by:
createResponse
in classSolrRequest<SolrPingResponse>
- Parameters:
client
- theSolrClient
the request will be sent to
-
getParams
public ModifiableSolrParams getParams()
- Specified by:
getParams
in classSolrRequest<SolrPingResponse>
-
getRequestType
public String getRequestType()
Description copied from class:SolrRequest
This method defines the type of this Solr request.- Specified by:
getRequestType
in classSolrRequest<SolrPingResponse>
-
removeAction
public SolrPing removeAction()
Remove the action parameter from this request. This will result in the same behavior asSolrPing#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
-
-