Class LBSolrClient.Endpoint
- java.lang.Object
-
- org.apache.solr.client.solrj.impl.LBSolrClient.Endpoint
-
- Enclosing class:
- LBSolrClient
public static class LBSolrClient.Endpoint extends Object
A Solr endpoint forLBSolrClientto include in its load-balancingUsed in many places instead of the more common String URL to allow
LBSolrClientto more easily determine whether a URL is a "base" or "core-aware" URL.
-
-
Constructor Summary
Constructors Constructor Description Endpoint(String baseUrl)Creates anLBSolrClient.Endpointrepresenting a "base" URL of a Solr nodeEndpoint(String baseUrl, String core)Create anLBSolrClient.Endpointrepresenting a Solr core or collection
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)StringgetBaseUrl()Return the base URL of the Solr node this endpoint representsStringgetCore()The core or collection this endpoint representsStringgetUrl()Get the full URL, possibly including the collection/core if one was providedinthashCode()StringtoString()
-
-
-
Constructor Detail
-
Endpoint
public Endpoint(String baseUrl)
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
public Endpoint(String baseUrl, String core)
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 Detail
-
getBaseUrl
public String 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
public String 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
public String getUrl()
Get the full URL, possibly including the collection/core if one was provided
-
-