Class LBSolrClient.Endpoint
java.lang.Object
org.apache.solr.client.solrj.impl.LBSolrClient.Endpoint
- Enclosing class:
LBSolrClient
A Solr endpoint for
LBSolrClient to include in its load-balancing
Used in many places instead of the more common String URL to allow LBSolrClient to
more easily determine whether a URL is a "base" or "core-aware" URL.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates anLBSolrClient.Endpointrepresenting a "base" URL of a Solr nodeCreate anLBSolrClient.Endpointrepresenting a Solr core or collection -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic LBSolrClient.EndpointCreate anLBSolrClient.Endpointfrom a provided Solr URLReturn the base URL of the Solr node this endpoint representsgetCore()The core or collection this endpoint representsgetUrl()Get the full URL, possibly including the collection/core if one was providedinthashCode()toString()
-
Constructor Details
-
Endpoint
Creates anLBSolrClient.Endpointrepresenting a "base" URL of a Solr node- Parameters:
baseUrl- a base Solr URL, in the form "http[s]://host:port/solr"
-
Endpoint
Create anLBSolrClient.Endpointrepresenting a Solr core or collection- Parameters:
baseUrl- a base Solr URL, in the form "http[s]://host:port/solr"core- the name of a Solr core or collection
-
-
Method Details
-
getBaseUrl
Return the base URL of the Solr node this endpoint represents- Returns:
- a base Solr URL, in the form "http[s]://host:port/solr"
-
getCore
The core or collection this endpoint represents- Returns:
- a core/collection name, or null if this endpoint doesn't represent a particular core.
-
getUrl
Get the full URL, possibly including the collection/core if one was provided -
toString
-
hashCode
public int hashCode() -
equals
-
from
Create anLBSolrClient.Endpointfrom a provided Solr URLThis method does its best to determine whether the provided URL is a Solr "base" URL or one which includes a core or collection name.
-