public static class ConcurrentUpdateHttp2SolrClient.Builder extends Object
ConcurrentUpdateHttp2SolrClient
instances from provided configuration.Modifier and Type | Field and Description |
---|---|
protected String |
baseSolrUrl |
protected Http2SolrClient |
client |
protected boolean |
closeHttp2Client |
protected ExecutorService |
executorService |
protected int |
queueSize |
protected boolean |
streamDeletes |
protected int |
threadCount |
Constructor and Description |
---|
Builder(String baseSolrUrl,
Http2SolrClient client) |
Builder(String baseSolrUrl,
Http2SolrClient client,
boolean closeHttp2Client) |
Modifier and Type | Method and Description |
---|---|
ConcurrentUpdateHttp2SolrClient.Builder |
alwaysStreamDeletes()
Configures created clients to always stream delete requests.
|
ConcurrentUpdateHttp2SolrClient |
build()
Create a
ConcurrentUpdateHttp2SolrClient based on the provided configuration options. |
ConcurrentUpdateHttp2SolrClient.Builder |
neverStreamDeletes()
Configures created clients to not stream delete requests.
|
ConcurrentUpdateHttp2SolrClient.Builder |
withExecutorService(ExecutorService executorService)
Provides the
ExecutorService for the created client to use when servicing the update-request queue. |
ConcurrentUpdateHttp2SolrClient.Builder |
withQueueSize(int queueSize)
The maximum number of requests buffered by the SolrClient's internal queue before being processed by background threads.
|
ConcurrentUpdateHttp2SolrClient.Builder |
withThreadCount(int threadCount)
The maximum number of threads used to empty
ConcurrentUpdateHttp2SolrClient s queue. |
protected Http2SolrClient client
protected String baseSolrUrl
protected int queueSize
protected int threadCount
protected ExecutorService executorService
protected boolean streamDeletes
protected boolean closeHttp2Client
public Builder(String baseSolrUrl, Http2SolrClient client)
public Builder(String baseSolrUrl, Http2SolrClient client, boolean closeHttp2Client)
public ConcurrentUpdateHttp2SolrClient.Builder withQueueSize(int queueSize)
SolrClient.request(SolrRequest)
calls block waiting to add requests to the queue.
If not set, this defaults to 10.withThreadCount(int)
public ConcurrentUpdateHttp2SolrClient.Builder withThreadCount(int threadCount)
ConcurrentUpdateHttp2SolrClient
s queue.
Threads are created when documents are added to the client's internal queue and exit when no updates remain in
the queue.
This value should be carefully paired with the maximum queue capacity. A client with too few threads may suffer
decreased throughput as the queue fills up and SolrClient.request(SolrRequest)
calls
block waiting to add requests to the queue.
public ConcurrentUpdateHttp2SolrClient.Builder withExecutorService(ExecutorService executorService)
ExecutorService
for the created client to use when servicing the update-request queue.public ConcurrentUpdateHttp2SolrClient.Builder alwaysStreamDeletes()
public ConcurrentUpdateHttp2SolrClient.Builder neverStreamDeletes()
public ConcurrentUpdateHttp2SolrClient build()
ConcurrentUpdateHttp2SolrClient
based on the provided configuration options.Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.