Class Http2SolrClient
- java.lang.Object
-
- org.apache.solr.client.solrj.SolrClient
-
- org.apache.solr.client.solrj.impl.Http2SolrClient
-
- All Implemented Interfaces:
Closeable,Serializable,AutoCloseable
public class Http2SolrClient extends SolrClient
Difference between thisHttp2SolrClientandHttpSolrClient:Http2SolrClientsends requests in HTTP/2Http2SolrClientcan point to multiple urlsHttp2SolrClientdoes not expose its internal httpClient likeHttpSolrClient.getHttpClient(), sharing connection pools should be done byHttp2SolrClient.Builder.withHttpClient(Http2SolrClient)
- See Also:
- Serialized Form
- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classHttp2SolrClient.Builderstatic interfaceHttp2SolrClient.OnCompletestatic classHttp2SolrClient.OutStream
-
Field Summary
Fields Modifier and Type Field Description static StringREQ_PRINCIPAL_KEY
-
Constructor Summary
Constructors Modifier Constructor Description protectedHttp2SolrClient(String serverBaseUrl, Http2SolrClient.Builder builder)
-
Method Summary
-
Methods inherited from class org.apache.solr.client.solrj.SolrClient
add, add, add, add, add, add, add, add, add, add, addBean, addBean, addBean, addBean, addBeans, addBeans, addBeans, addBeans, addBeans, addBeans, commit, commit, commit, commit, commit, commit, deleteById, deleteById, deleteById, deleteById, deleteById, deleteById, deleteById, deleteById, deleteByQuery, deleteByQuery, deleteByQuery, deleteByQuery, getBinder, getById, getById, getById, getById, getById, getById, getById, getById, optimize, optimize, optimize, optimize, optimize, optimize, ping, query, query, query, query, queryAndStreamResponse, queryAndStreamResponse, queryAndStreamResponse, request, rollback, rollback
-
-
-
-
Field Detail
-
REQ_PRINCIPAL_KEY
public static final String REQ_PRINCIPAL_KEY
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Http2SolrClient
protected Http2SolrClient(String serverBaseUrl, Http2SolrClient.Builder builder)
-
-
Method Detail
-
addListenerFactory
public void addListenerFactory(HttpListenerFactory factory)
-
close
public void close()
-
isV2ApiRequest
public boolean isV2ApiRequest(SolrRequest request)
-
getIdleTimeout
public long getIdleTimeout()
-
initOutStream
public Http2SolrClient.OutStream initOutStream(String baseUrl, UpdateRequest updateRequest, String collection) throws IOException
- Throws:
IOException
-
send
public void send(Http2SolrClient.OutStream outStream, SolrRequest req, String collection) throws IOException
- Throws:
IOException
-
request
public NamedList<Object> request(SolrRequest solrRequest, String collection, Http2SolrClient.OnComplete onComplete) throws IOException, SolrServerException
- Throws:
IOExceptionSolrServerException
-
request
public NamedList<Object> request(SolrRequest request, String collection) throws SolrServerException, IOException
Description copied from class:SolrClientExecute a request against a Solr server for a given collection- Specified by:
requestin classSolrClient- Parameters:
request- the request to executecollection- the collection to execute the request against- Returns:
- a
NamedListcontaining the response from the server - Throws:
SolrServerException- if there is an error on the serverIOException- If there is a low-level I/O error.
-
setRequestWriter
public void setRequestWriter(RequestWriter requestWriter)
-
setFollowRedirects
public void setFollowRedirects(boolean follow)
-
getBaseURL
public String getBaseURL()
-
setQueryParams
public void setQueryParams(Set<String> queryParams)
Expert Method- Parameters:
queryParams- set of param keys to only send via the query string Note that the param will be sent as a query string if the key is part of this Set or the SolrRequest's query params.- See Also:
SolrRequest.getQueryParams()
-
getParser
public ResponseParser getParser()
-
setParser
public void setParser(ResponseParser processor)
-
setDefaultSSLConfig
public static void setDefaultSSLConfig(SSLConfig sslConfig)
-
resetSslContextFactory
public static void resetSslContextFactory()
-
-