Package org.apache.camel.component.solr
Class SolrConfiguration
java.lang.Object
org.apache.camel.component.solr.SolrConfiguration
- All Implemented Interfaces:
Cloneable
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionSolrConfiguration(SolrConfiguration.SolrScheme solrScheme, String url, String zkChroot) -
Method Summary
Modifier and TypeMethodDescriptiondeepCopy()org.apache.http.client.HttpClientorg.apache.solr.client.solrj.SolrClientintintgetUrl()booleanbooleanstatic SolrConfigurationnewInstance(String endpointUri, String remaining) voidsetAllowCompression(Boolean allowCompression) Server side must support gzip or deflate for this to have any effectvoidsetAutoCommit(boolean autoCommit) If true, each producer operation will be automatically followed by a commitvoidsetCollection(String collection) Set the default collection for SolrCloudvoidsetConnectionTimeout(Integer connectionTimeout) Sets the connection timeout on the SolrClientvoidsetDefaultMaxConnectionsPerHost(Integer defaultMaxConnectionsPerHost) maxConnectionsPerHost on the underlying HttpConnectionManagervoidsetFollowRedirects(Boolean followRedirects) Indicates whether redirects are used to get to the Solr servervoidsetHttpClient(org.apache.http.client.HttpClient httpClient) Sets the http client to be used by the solrClient.voidsetMaxRetries(Integer maxRetries) Maximum number of retries to attempt in the event of transient errorsvoidsetMaxTotalConnections(Integer maxTotalConnections) maxTotalConnection on the underlying HttpConnectionManagervoidsetPassword(String password) Sets password for basic auth plugin enabled serversvoidsetRequestHandler(String requestHandler) Set the request handler to be usedvoidsetSolrClient(org.apache.solr.client.solrj.SolrClient solrClient) Uses the provided solr client to connect to solr.voidsetSolrScheme(SolrConfiguration.SolrScheme solrScheme) voidsetSoTimeout(Integer soTimeout) Sets the socket timeout on the SolrClientvoidsetStreamingQueueSize(int streamingQueueSize) Sets the queue size for the ConcurrentUpdateSolrClientvoidsetStreamingThreadCount(int streamingThreadCount) Sets the number of threads for the ConcurrentUpdateSolrClientvoidsetUsername(String username) Sets username for basic auth plugin enabled serversvoidsetZkChroot(String zkChroot) Set the chroot of the zookeeper connection (include the leading slash; e.g.voidSet the ZooKeeper host(s) urls which the CloudSolrClient uses, e.g.
-
Constructor Details
-
SolrConfiguration
-
-
Method Details
-
newInstance
-
getSolrScheme
-
setSolrScheme
-
getUrl
-
getStreamingQueueSize
public int getStreamingQueueSize() -
setStreamingQueueSize
public void setStreamingQueueSize(int streamingQueueSize) Sets the queue size for the ConcurrentUpdateSolrClient -
getStreamingThreadCount
public int getStreamingThreadCount() -
setStreamingThreadCount
public void setStreamingThreadCount(int streamingThreadCount) Sets the number of threads for the ConcurrentUpdateSolrClient -
getMaxRetries
-
setMaxRetries
Maximum number of retries to attempt in the event of transient errors -
getSoTimeout
-
setSoTimeout
Sets the socket timeout on the SolrClient -
getConnectionTimeout
-
setConnectionTimeout
Sets the connection timeout on the SolrClient -
getDefaultMaxConnectionsPerHost
-
setDefaultMaxConnectionsPerHost
maxConnectionsPerHost on the underlying HttpConnectionManager -
getMaxTotalConnections
-
setMaxTotalConnections
maxTotalConnection on the underlying HttpConnectionManager -
getFollowRedirects
-
setFollowRedirects
Indicates whether redirects are used to get to the Solr server -
getAllowCompression
-
setAllowCompression
Server side must support gzip or deflate for this to have any effect -
getZkHost
-
setZkHost
Set the ZooKeeper host(s) urls which the CloudSolrClient uses, e.g. "zkHost=localhost:2181,localhost:2182". Optionally add the chroot, e.g. "zkHost=localhost:2181,localhost:2182/rootformysolr". In case the first part of the url path (='contextroot') is set to 'solr' (e.g. 'localhost:2181/solr' or 'localhost:2181/solr/..'), then that path is not considered as zookeeper chroot for backward compatibility reasons (this behaviour can be overridden via zkChroot parameter). -
getZkChroot
-
setZkChroot
Set the chroot of the zookeeper connection (include the leading slash; e.g. '/mychroot') -
getCollection
-
setCollection
Set the default collection for SolrCloud -
getRequestHandler
-
setRequestHandler
Set the request handler to be used -
getUsername
-
setUsername
Sets username for basic auth plugin enabled servers -
getPassword
-
setPassword
Sets password for basic auth plugin enabled servers -
isAutoCommit
public boolean isAutoCommit() -
setAutoCommit
public void setAutoCommit(boolean autoCommit) If true, each producer operation will be automatically followed by a commit -
getSolrClient
public org.apache.solr.client.solrj.SolrClient getSolrClient() -
setSolrClient
public void setSolrClient(org.apache.solr.client.solrj.SolrClient solrClient) Uses the provided solr client to connect to solr. When this parameter is not specified, camel applies the following rules to determine the SolrClient: 1) when zkHost or zkChroot (=zookeeper root) parameter is set, then the CloudSolrClient is used. 2) when multiple hosts are specified in the uri (separated with a comma), then the CloudSolrClient (uri scheme is 'solrCloud') or the LBHttpSolrClient (uri scheme is not 'solrCloud') is used. 3) when the solr operation is INSERT_STREAMING, then the ConcurrentUpdateSolrClient is used. 4) otherwise, the HttpSolrClient is used. Note: A CloudSolrClient should point to zookeeper endpoint(s); other clients point to Solr endpoint(s). The SolrClient can also be set via the exchange header 'CamelSolrClient'. -
getHttpClient
public org.apache.http.client.HttpClient getHttpClient() -
setHttpClient
public void setHttpClient(org.apache.http.client.HttpClient httpClient) Sets the http client to be used by the solrClient. This is only applicable when solrClient is not set. -
getUseConcurrentUpdateSolrClient
public boolean getUseConcurrentUpdateSolrClient() -
getSolrEndpoint
-
deepCopy
-