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 forLBSolrClient
to include in its load-balancingUsed 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
Constructors Constructor Description Endpoint(String baseUrl)
Creates anLBSolrClient.Endpoint
representing a "base" URL of a Solr nodeEndpoint(String baseUrl, String core)
Create anLBSolrClient.Endpoint
representing a Solr core or collection
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
String
getBaseUrl()
Return the base URL of the Solr node this endpoint representsString
getCore()
The core or collection this endpoint representsString
getUrl()
Get the full URL, possibly including the collection/core if one was providedint
hashCode()
String
toString()
-
-
-
Constructor Detail
-
Endpoint
public Endpoint(String baseUrl)
Creates anLBSolrClient.Endpoint
representing 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.Endpoint
representing 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
-
-