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) | 限定符和类型 | 类和说明 |
|---|---|
static class |
Http2SolrClient.Builder |
static interface |
Http2SolrClient.OnComplete |
static class |
Http2SolrClient.OutStream |
| 限定符和类型 | 字段和说明 |
|---|---|
static String |
REQ_PRINCIPAL_KEY |
| 限定符 | 构造器和说明 |
|---|---|
protected |
Http2SolrClient(String serverBaseUrl,
Http2SolrClient.Builder builder) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addListenerFactory(HttpListenerFactory factory) |
void |
close() |
String |
getBaseURL() |
long |
getIdleTimeout() |
ResponseParser |
getParser() |
Set<String> |
getQueryParams() |
Http2SolrClient.OutStream |
initOutStream(String baseUrl,
UpdateRequest updateRequest,
String collection) |
boolean |
isV2ApiRequest(SolrRequest request) |
NamedList<Object> |
request(SolrRequest request,
String collection)
Execute a request against a Solr server for a given collection
|
NamedList<Object> |
request(SolrRequest solrRequest,
String collection,
Http2SolrClient.OnComplete onComplete) |
static void |
resetSslContextFactory() |
void |
send(Http2SolrClient.OutStream outStream,
SolrRequest req,
String collection) |
static void |
setDefaultSSLConfig(SSLConfig sslConfig) |
void |
setFollowRedirects(boolean follow) |
void |
setParser(ResponseParser processor) |
void |
setQueryParams(Set<String> queryParams)
Expert Method
|
void |
setRequestWriter(RequestWriter requestWriter) |
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, ping, query, query, query, query, queryAndStreamResponse, queryAndStreamResponse, queryAndStreamResponse, request, rollback, rollbackprotected 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
IOExceptionpublic void send(Http2SolrClient.OutStream outStream, SolrRequest req, String collection) throws IOException
IOExceptionpublic NamedList<Object> request(SolrRequest solrRequest, String collection, Http2SolrClient.OnComplete onComplete) throws IOException, SolrServerException
public NamedList<Object> request(SolrRequest request, String collection) throws SolrServerException, IOException
SolrClientrequest 在类中 SolrClientrequest - 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 © 2006–2022 The Apache Software Foundation. All rights reserved.