public class Http2SolrClient extends SolrClient
Http2SolrClient
and HttpSolrClient
:
Http2SolrClient
sends requests in HTTP/2Http2SolrClient
can point to multiple urlsHttp2SolrClient
does not expose its internal httpClient like HttpSolrClient.getHttpClient()
,
sharing connection pools should be done by Http2SolrClient.Builder.withHttpClient(Http2SolrClient)
Modifier and Type | Class and Description |
---|---|
static class |
Http2SolrClient.Builder |
static interface |
Http2SolrClient.OnComplete |
static class |
Http2SolrClient.OutStream |
Modifier and Type | Field and Description |
---|---|
static String |
REQ_PRINCIPAL_KEY |
Modifier | Constructor and Description |
---|---|
protected |
Http2SolrClient(String serverBaseUrl,
Http2SolrClient.Builder builder) |
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
public static final String REQ_PRINCIPAL_KEY
protected Http2SolrClient(String serverBaseUrl, Http2SolrClient.Builder builder)
public void addListenerFactory(HttpListenerFactory factory)
public void close()
public boolean isV2ApiRequest(SolrRequest request)
public long getIdleTimeout()
public Http2SolrClient.OutStream initOutStream(String baseUrl, UpdateRequest updateRequest, String collection) throws IOException
IOException
public void send(Http2SolrClient.OutStream outStream, SolrRequest req, String collection) throws IOException
IOException
public NamedList<Object> request(SolrRequest solrRequest, String collection, Http2SolrClient.OnComplete onComplete) throws IOException, SolrServerException
IOException
SolrServerException
public NamedList<Object> request(SolrRequest request, String collection) throws SolrServerException, IOException
SolrClient
request
in class SolrClient
request
- the request to executecollection
- the collection to execute the request againstNamedList
containing the response from the serverSolrServerException
- if there is an error on the serverIOException
- If there is a low-level I/O error.public void setRequestWriter(RequestWriter requestWriter)
public void setFollowRedirects(boolean follow)
public String getBaseURL()
public void setQueryParams(Set<String> queryParams)
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.SolrRequest.getQueryParams()
public ResponseParser getParser()
public void setParser(ResponseParser processor)
public static void setDefaultSSLConfig(SSLConfig sslConfig)
public static void resetSslContextFactory()
Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.