Package org.apache.solr.client.solrj.impl

# Class ConcurrentUpdateBaseSolrClient

java.lang.Object
org.apache.solr.client.solrj.SolrClient
org.apache.solr.client.solrj.impl.ConcurrentUpdateBaseSolrClient

All Implemented Interfaces:
  `Closeable`, `Serializable`, `AutoCloseable`

public abstract class ConcurrentUpdateBaseSolrClient extends SolrClient
A ConcurrentUpdate `SolrClient` -- it sends updates concurrently and asynchronously.

See Also:
  - Serialized Form

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`static class`
`ConcurrentUpdateBaseSolrClient.Builder`
Constructs `ConcurrentUpdateBaseSolrClient` instances from provided configuration.
`protected static class`
`ConcurrentUpdateBaseSolrClient.CustomBlockingQueue<E>`
`static interface`
`ConcurrentUpdateBaseSolrClient.StreamingResponse`
Abstraction for streaming HTTP response handling in `ConcurrentUpdateBaseSolrClient`.
`protected static final record`
`ConcurrentUpdateBaseSolrClient.Update`
Class representing an UpdateRequest and an optional collection.

## Nested classes/interfaces inherited from class org.apache.solr.client.solrj.SolrClient

`SolrClient.SolrClientFunction<C extends SolrClient,R>`

## Field Summary

Fields
Modifier and Type
Field
Description
`protected final String`
`basePath`
`protected long`
`pollQueueTimeMillis`
`protected final ConcurrentUpdateBaseSolrClient.CustomBlockingQueue<ConcurrentUpdateBaseSolrClient.Update>`
`queue`
`protected StallDetection`
`stallDetection`

### Fields inherited from class org.apache.solr.client.solrj.SolrClient

`defaultCollection`

## Constructor Summary

Constructors
Modifier
Constructor
Description
`protected`
`ConcurrentUpdateBaseSolrClient(ConcurrentUpdateBaseSolrClient.Builder builder)`

## Method Summary

Modifier and Type
Method
Description
`void`
`blockUntilFinished()`
`void`
`close()`
`protected abstract ConcurrentUpdateBaseSolrClient.StreamingResponse`
`doSendUpdateStream(ConcurrentUpdateBaseSolrClient.Update update)`
`void`
`handleError(Throwable ex)`
`protected void`
`notifyQueueAndRunnersIfEmptyQueue()`
`void`
`onSuccess(Object responseMetadata, InputStream respBody)`
Intended to be used as an extension point for doing post-processing after a request completes.
`NamedList<Object>`
`request(SolrRequest<?> request, String collection)`
Execute a request against a Solr server for a given collection
`void`
`shutdownNow()`

### 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, getById, getById, getById, getById, getById, getById, getById, getById, getContext, getDefaultCollection, optimize, optimize, optimize, optimize, optimize, optimize, ping, ping, query, query, query, query, queryAndStreamResponse, queryAndStreamResponse, queryAndStreamResponse, request, rollback, rollback`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### basePath

protected final String basePath

### queue

protected final ConcurrentUpdateBaseSolrClient.CustomBlockingQueue<ConcurrentUpdateBaseSolrClient.Update> queue

### pollQueueTimeMillis

protected long pollQueueTimeMillis

### stallDetection

protected StallDetection stallDetection

## Constructor Details

### ConcurrentUpdateBaseSolrClient

protected ConcurrentUpdateBaseSolrClient(ConcurrentUpdateBaseSolrClient.Builder builder)

## Method Details

### doSendUpdateStream

protected abstract ConcurrentUpdateBaseSolrClient.StreamingResponse doSendUpdateStream(ConcurrentUpdateBaseSolrClient.Update update) throws IOException, InterruptedException

Throws:
  `IOException`
  `InterruptedException`

### notifyQueueAndRunnersIfEmptyQueue

protected void notifyQueueAndRunnersIfEmptyQueue()

### request

public NamedList<Object> request(SolrRequest<?> request, String collection) throws SolrServerException, IOException
Description copied from class: `SolrClient`
Execute a request against a Solr server for a given collection

Specified by:
  `request` in class `SolrClient`
Parameters:
  `request` - the request to execute
  `collection` - the collection to execute the request against
Returns:
  a `NamedList` containing the response from the server
Throws:
  `SolrServerException` - if there is an error on the server
  `IOException` - If there is a low-level I/O error.

### blockUntilFinished

public void blockUntilFinished() throws IOException

Throws:
  `IOException`

### handleError

public void handleError(Throwable ex)

### onSuccess

public void onSuccess(Object responseMetadata, InputStream respBody)
Intended to be used as an extension point for doing post-processing after a request completes.

Parameters:
  `responseMetadata` - implementation-specific response object (e.g., Jetty Response), may be null
  `respBody` - the body of the response, subclasses must not close this stream.

### close

public void close()

### shutdownNow

public void shutdownNow()