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

    java.lang.Object
      org.apache.solr.client.solrj.SolrServer
          org.apache.solr.client.solrj.impl.CommonsHttpSolrServer
              org.apache.solr.client.solrj.impl.StreamingUpdateSolrServer

All Implemented Interfaces:
  Serializable

    public class StreamingUpdateSolrServer

extends CommonsHttpSolrServer

StreamingHttpSolrServer 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 the `StreamingUpdateSolrServer` with /update requests. The query interface is better suited for

Since:
  solr 1.4
Version:
  $Id: CommonsHttpSolrServer.java 724175 2008-12-07 19:07:11Z ryan $
See Also:
  Serialized Form

Field Summary

Fields inherited from class org.apache.solr.client.solrj.impl.CommonsHttpSolrServer
`_baseURL, _invariantParams, _parser, AGENT, requestWriter`

Constructor Summary
`StreamingUpdateSolrServer(String solrServerUrl, int queueSize, int threadCount)`

Method Summary
`void` `blockUntilFinished()`
`void` `handleError(Throwable ex)`
`NamedList<Object>` `request(SolrRequest request)` Process the request.

Methods inherited from class org.apache.solr.client.solrj.impl.CommonsHttpSolrServer
`add, addBeans, getBaseURL, getHttpClient, getInvariantParams, getParser, request, setAllowCompression, setBaseURL, setConnectionManagerTimeout, setConnectionManagerTimeout, setConnectionTimeout, setDefaultMaxConnectionsPerHost, setFollowRedirects, setMaxRetries, setMaxTotalConnections, setParser, setRequestWriter, setSoTimeout`

Methods inherited from class org.apache.solr.client.solrj.SolrServer
`add, add, addBean, addBeans, commit, commit, deleteById, deleteById, 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

### StreamingUpdateSolrServer

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

Throws:
  `MalformedURLException`

Method Detail

### request

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

  Description copied from class: `CommonsHttpSolrServer`
  Process the request. If `SolrRequest.getResponseParser()` is null, then use `CommonsHttpSolrServer.getParser()`

  Overrides:
    `request` in class `CommonsHttpSolrServer`
  Parameters:
    `request` - The `SolrRequest` to process
  Returns:
    The `NamedList` result
  Throws:
    `SolrServerException`
    `IOException`
  See Also:
    `CommonsHttpSolrServer.request(org.apache.solr.client.solrj.SolrRequest, org.apache.solr.client.solrj.ResponseParser)`

### blockUntilFinished

    public void blockUntilFinished()

### handleError

    public void handleError(Throwable ex)

Copyright © 2009 Apache Software Foundation. All Rights Reserved.