public class ConcurrentUpdateSolrServer extends SolrServer
UpdateRequest
are converted to http request
parameters. When params change between UpdateRequests a new HTTP
request is started.
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.Constructor and Description |
---|
ConcurrentUpdateSolrServer(String solrServerUrl,
org.apache.http.client.HttpClient client,
int queueSize,
int threadCount) |
ConcurrentUpdateSolrServer(String solrServerUrl,
org.apache.http.client.HttpClient client,
int queueSize,
int threadCount,
ExecutorService es)
Uses the supplied HttpClient to send documents to the Solr server.
|
ConcurrentUpdateSolrServer(String solrServerUrl,
org.apache.http.client.HttpClient client,
int queueSize,
int threadCount,
ExecutorService es,
boolean streamDeletes)
Uses the supplied HttpClient to send documents to the Solr server.
|
ConcurrentUpdateSolrServer(String solrServerUrl,
int queueSize,
int threadCount)
Uses an internally managed HttpClient instance.
|
Modifier and Type | Method and Description |
---|---|
void |
blockUntilFinished() |
Set<String> |
getQueryParams() |
void |
handleError(Throwable ex) |
NamedList<Object> |
request(SolrRequest request)
SolrServer implementations need to implement how a request is actually processed
|
void |
setConnectionTimeout(int timeout) |
void |
setParser(ResponseParser responseParser) |
void |
setPollQueueTime(int pollQueueTime) |
void |
setQueryParams(Set<String> queryParams)
Expert Method.
|
void |
setRequestWriter(RequestWriter requestWriter) |
void |
setSoTimeout(int timeout)
set soTimeout (read timeout) on the underlying HttpConnectionManager.
|
void |
shutdown()
Release allocated resources.
|
void |
shutdownNow() |
add, add, add, add, addBean, addBean, addBeans, addBeans, commit, commit, commit, deleteById, deleteById, deleteById, deleteById, deleteByQuery, deleteByQuery, getBinder, optimize, optimize, optimize, ping, query, query, queryAndStreamResponse, rollback
public ConcurrentUpdateSolrServer(String solrServerUrl, int queueSize, int threadCount)
solrServerUrl
- The Solr server URLqueueSize
- The buffer size before the documents are sent to the serverthreadCount
- The number of background threads used to empty the queuepublic ConcurrentUpdateSolrServer(String solrServerUrl, org.apache.http.client.HttpClient client, int queueSize, int threadCount)
public ConcurrentUpdateSolrServer(String solrServerUrl, org.apache.http.client.HttpClient client, int queueSize, int threadCount, ExecutorService es)
public ConcurrentUpdateSolrServer(String solrServerUrl, org.apache.http.client.HttpClient client, int queueSize, int threadCount, ExecutorService es, boolean streamDeletes)
public void setQueryParams(Set<String> queryParams)
queryParams
- set of param keys to only send via the query stringpublic NamedList<Object> request(SolrRequest request) throws SolrServerException, IOException
SolrServer
request
in class SolrServer
SolrServerException
IOException
public void blockUntilFinished()
public void handleError(Throwable ex)
public void shutdown()
SolrServer
shutdown
in class SolrServer
public void setConnectionTimeout(int timeout)
public void setSoTimeout(int timeout)
public void shutdownNow()
public void setParser(ResponseParser responseParser)
public void setPollQueueTime(int pollQueueTime)
pollQueueTime
- time for an open connection to wait for updates when
the queue is empty.public void setRequestWriter(RequestWriter requestWriter)
Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.