ConcurrentUpdateSolrServer (Solr 3.6.2 API)
Keywords: org.apache.solr.client.solrj.impl.ConcurrentUpdateSolrServer class

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.solr.client.solrj.impl
Class ConcurrentUpdateSolrServer

    java.lang.Object
      org.apache.solr.client.solrj.SolrServer
          org.apache.solr.client.solrj.impl.ConcurrentUpdateSolrServer

All Implemented Interfaces:
  Serializable

    public class ConcurrentUpdateSolrServer

extends SolrServer

ConcurrentUpdateSolrServer buffers all added documents and writes them into open HTTP connections. This class is thread safe. Although any SolrServer request can be made with this implementation, it is only recommended to use ConcurrentUpdateSolrServer with /update requests. The class `HttpSolrServer` is better suited for the query interface.

See Also:
  Serialized Form

Constructor Summary
`ConcurrentUpdateSolrServer(String solrServerUrl, org.apache.http.client.HttpClient client, int queueSize, int threadCount)` Uses the supplied HttpClient to send documents to the Solr server, the HttpClient should be instantiated using a ThreadSafeClientConnManager.
`ConcurrentUpdateSolrServer(String solrServerUrl, int queueSize, int threadCount)` Uses an internal ThreadSafeClientConnManager to manage http connections.

Method Summary
`void` | `blockUntilFinished()`
`void` | `handleError(Throwable ex)`
`NamedList<Object>` | `request(SolrRequest request)` SolrServer implementations need to implement how a request is actually processed
`void` | `setParser(ResponseParser responseParser)`
`void` | `setRequestWriter(RequestWriter requestWriter)`
`void` | `shutdown()`
`void` | `shutdownNow()`

Methods inherited from class org.apache.solr.client.solrj.SolrServer
`add, add, add, add, addBean, addBean, addBeans, addBeans, commit, commit, deleteById, deleteById, deleteById, deleteById, deleteByQuery, deleteByQuery, getBinder, optimize, optimize, optimize, ping, query, query, rollback`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ConcurrentUpdateSolrServer

    public ConcurrentUpdateSolrServer(String solrServerUrl,
                                      int queueSize,
                                      int threadCount)
                               throws MalformedURLException

  Uses an internal ThreadSafeClientConnManager to manage http connections.

  Parameters:
    `solrServerUrl` - The Solr server URL
    `queueSize` - The buffer size before the documents are sent to the server
    `threadCount` - The number of background threads used to empty the queue
  Throws:
    `MalformedURLException`

### ConcurrentUpdateSolrServer

    public ConcurrentUpdateSolrServer(String solrServerUrl,
                                      org.apache.http.client.HttpClient client,
                                      int queueSize,
                                      int threadCount)
                               throws MalformedURLException

  Uses the supplied HttpClient to send documents to the Solr server, the HttpClient should be instantiated using a ThreadSafeClientConnManager.

  Throws:
    `MalformedURLException`

Method Detail

### request

    public NamedList<Object> request(SolrRequest request)
                              throws SolrServerException,
                                     IOException

  Description copied from class: `SolrServer`
  SolrServer implementations need to implement how a request is actually processed

  Specified by:
    `request` in class `SolrServer`
  Throws:
    `SolrServerException`
    `IOException`

### blockUntilFinished

    public void blockUntilFinished()

### handleError

    public void handleError(Throwable ex)

### shutdown

    public void shutdown()

### shutdownNow

    public void shutdownNow()

### setParser

    public void setParser(ResponseParser responseParser)

### setRequestWriter

    public void setRequestWriter(RequestWriter requestWriter)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD