Package org.apache.camel.component.solr
Class SolrEndpoint
- java.lang.Object
-
- org.apache.camel.support.service.BaseService
-
- org.apache.camel.support.service.ServiceSupport
-
- org.apache.camel.support.DefaultEndpoint
-
- org.apache.camel.component.solr.SolrEndpoint
-
- All Implemented Interfaces:
AutoCloseable
,org.apache.camel.CamelContextAware
,org.apache.camel.Endpoint
,org.apache.camel.IsSingleton
,org.apache.camel.Service
,org.apache.camel.ShutdownableService
,org.apache.camel.spi.HasId
,org.apache.camel.StatefulService
,org.apache.camel.SuspendableService
@UriEndpoint(firstVersion="2.9.0", scheme="solr,solrs,solrCloud", title="Solr", syntax="solr:url", producerOnly=true, category={MONITORING,SEARCH}) public class SolrEndpoint extends org.apache.camel.support.DefaultEndpoint
Perform operations against Apache Lucene Solr.
-
-
Constructor Summary
Constructors Constructor Description SolrEndpoint(String endpointUri, SolrComponent component, String address)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.camel.Consumer
createConsumer(org.apache.camel.Processor processor)
org.apache.camel.Producer
createProducer()
Boolean
getAllowCompression()
String
getCollection()
SolrComponent
getComponent()
Integer
getConnectionTimeout()
Integer
getDefaultMaxConnectionsPerHost()
Boolean
getFollowRedirects()
Integer
getMaxRetries()
Integer
getMaxTotalConnections()
String
getPassword()
String
getRequestHandler()
Integer
getSoTimeout()
int
getStreamingQueueSize()
int
getStreamingThreadCount()
String
getUsername()
String
getZkHost()
protected void
onProducerShutdown(SolrProducer producer)
void
setAllowCompression(Boolean allowCompression)
Server side must support gzip or deflate for this to have any effectvoid
setCollection(String collection)
Set the collection name which the solrCloud server could usevoid
setConnectionTimeout(Integer connectionTimeout)
connectionTimeout on the underlying HttpConnectionManagervoid
setDefaultMaxConnectionsPerHost(Integer defaultMaxConnectionsPerHost)
maxConnectionsPerHost on the underlying HttpConnectionManagervoid
setFollowRedirects(Boolean followRedirects)
indicates whether redirects are used to get to the Solr servervoid
setMaxRetries(Integer maxRetries)
Maximum number of retries to attempt in the event of transient errorsvoid
setMaxTotalConnections(Integer maxTotalConnections)
maxTotalConnection on the underlying HttpConnectionManagervoid
setPassword(String password)
Sets password for basic auth plugin enabled serversvoid
setRequestHandler(String requestHandler)
Set the request handler to be usedvoid
setSoTimeout(Integer soTimeout)
Read timeout on the underlying HttpConnectionManager.void
setStreamingQueueSize(int streamingQueueSize)
Set the queue size for the StreamingUpdateSolrServervoid
setStreamingThreadCount(int streamingThreadCount)
Set the number of threads for the StreamingUpdateSolrServervoid
setUsername(String username)
Sets username for basic auth plugin enabled serversvoid
setZkHost(String zkHost)
Set the ZooKeeper host information which the solrCloud could use, such as "zkhost=localhost:8123".-
Methods inherited from class org.apache.camel.support.DefaultEndpoint
configureConsumer, configurePollingConsumer, configureProperties, createAsyncProducer, createEndpointUri, createExchange, createExchange, createPollingConsumer, doInit, doStart, doStop, equals, getCamelContext, getEndpointKey, getEndpointUri, getExceptionHandler, getExchangePattern, getId, getPollingConsumerBlockTimeout, getPollingConsumerQueueSize, hashCode, isAutowiredEnabled, isBridgeErrorHandler, isLazyStartProducer, isLenientProperties, isPollingConsumerBlockWhenFull, isSingleton, isSynchronous, setAutowiredEnabled, setBridgeErrorHandler, setCamelContext, setComponent, setEndpointUri, setEndpointUriIfNotSpecified, setExceptionHandler, setExchangePattern, setLazyStartProducer, setPollingConsumerBlockTimeout, setPollingConsumerBlockWhenFull, setPollingConsumerQueueSize, setProperties, setSynchronous, toString
-
Methods inherited from class org.apache.camel.support.service.BaseService
build, doBuild, doFail, doLifecycleChange, doResume, doShutdown, doSuspend, fail, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Constructor Detail
-
SolrEndpoint
public SolrEndpoint(String endpointUri, SolrComponent component, String address) throws Exception
- Throws:
Exception
-
-
Method Detail
-
setZkHost
public void setZkHost(String zkHost)
Set the ZooKeeper host information which the solrCloud could use, such as "zkhost=localhost:8123".
-
getZkHost
public String getZkHost()
-
setCollection
public void setCollection(String collection)
Set the collection name which the solrCloud server could use
-
getCollection
public String getCollection()
-
getComponent
public SolrComponent getComponent()
- Overrides:
getComponent
in classorg.apache.camel.support.DefaultEndpoint
-
onProducerShutdown
protected void onProducerShutdown(SolrProducer producer)
-
createConsumer
public org.apache.camel.Consumer createConsumer(org.apache.camel.Processor processor) throws Exception
- Throws:
Exception
-
setRequestHandler
public void setRequestHandler(String requestHandler)
Set the request handler to be used
-
getRequestHandler
public String getRequestHandler()
-
getStreamingThreadCount
public int getStreamingThreadCount()
-
setStreamingThreadCount
public void setStreamingThreadCount(int streamingThreadCount)
Set the number of threads for the StreamingUpdateSolrServer
-
getStreamingQueueSize
public int getStreamingQueueSize()
-
setStreamingQueueSize
public void setStreamingQueueSize(int streamingQueueSize)
Set the queue size for the StreamingUpdateSolrServer
-
getMaxRetries
public Integer getMaxRetries()
-
setMaxRetries
public void setMaxRetries(Integer maxRetries)
Maximum number of retries to attempt in the event of transient errors
-
getSoTimeout
public Integer getSoTimeout()
-
setSoTimeout
public void setSoTimeout(Integer soTimeout)
Read timeout on the underlying HttpConnectionManager. This is desirable for queries, but probably not for indexing
-
getConnectionTimeout
public Integer getConnectionTimeout()
-
setConnectionTimeout
public void setConnectionTimeout(Integer connectionTimeout)
connectionTimeout on the underlying HttpConnectionManager
-
getDefaultMaxConnectionsPerHost
public Integer getDefaultMaxConnectionsPerHost()
-
setDefaultMaxConnectionsPerHost
public void setDefaultMaxConnectionsPerHost(Integer defaultMaxConnectionsPerHost)
maxConnectionsPerHost on the underlying HttpConnectionManager
-
getMaxTotalConnections
public Integer getMaxTotalConnections()
-
setMaxTotalConnections
public void setMaxTotalConnections(Integer maxTotalConnections)
maxTotalConnection on the underlying HttpConnectionManager
-
getFollowRedirects
public Boolean getFollowRedirects()
-
setFollowRedirects
public void setFollowRedirects(Boolean followRedirects)
indicates whether redirects are used to get to the Solr server
-
getAllowCompression
public Boolean getAllowCompression()
-
setAllowCompression
public void setAllowCompression(Boolean allowCompression)
Server side must support gzip or deflate for this to have any effect
-
getUsername
public String getUsername()
-
setUsername
public void setUsername(String username)
Sets username for basic auth plugin enabled servers
-
getPassword
public String getPassword()
-
setPassword
public void setPassword(String password)
Sets password for basic auth plugin enabled servers
-
-