Class 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.
    • Field Summary

      • Fields inherited from class org.apache.camel.support.service.BaseService

        BUILT, FAILED, INITIALIZED, INITIALIZING, lock, NEW, SHUTDOWN, SHUTTING_DOWN, STARTED, STARTING, status, STOPPED, STOPPING, SUSPENDED, SUSPENDING
    • 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 effect
      void setCollection​(String collection)
      Set the collection name which the solrCloud server could use
      void setConnectionTimeout​(Integer connectionTimeout)
      connectionTimeout on the underlying HttpConnectionManager
      void setDefaultMaxConnectionsPerHost​(Integer defaultMaxConnectionsPerHost)
      maxConnectionsPerHost on the underlying HttpConnectionManager
      void setFollowRedirects​(Boolean followRedirects)
      indicates whether redirects are used to get to the Solr server
      void setMaxRetries​(Integer maxRetries)
      Maximum number of retries to attempt in the event of transient errors
      void setMaxTotalConnections​(Integer maxTotalConnections)
      maxTotalConnection on the underlying HttpConnectionManager
      void setPassword​(String password)
      Sets password for basic auth plugin enabled servers
      void setRequestHandler​(String requestHandler)
      Set the request handler to be used
      void setSoTimeout​(Integer soTimeout)
      Read timeout on the underlying HttpConnectionManager.
      void setStreamingQueueSize​(int streamingQueueSize)
      Set the queue size for the StreamingUpdateSolrServer
      void setStreamingThreadCount​(int streamingThreadCount)
      Set the number of threads for the StreamingUpdateSolrServer
      void setUsername​(String username)
      Sets username for basic auth plugin enabled servers
      void 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 interface org.apache.camel.Endpoint

        getEndpointBaseUri, isSingletonProducer
      • Methods inherited from interface org.apache.camel.Service

        build, close, init, start, stop
      • Methods inherited from interface org.apache.camel.ShutdownableService

        shutdown
      • Methods inherited from interface org.apache.camel.StatefulService

        getStatus, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspending
      • Methods inherited from interface org.apache.camel.SuspendableService

        isSuspended, resume, suspend
    • 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 class org.apache.camel.support.DefaultEndpoint
      • createProducer

        public org.apache.camel.Producer createProducer()
                                                 throws Exception
        Throws:
        Exception
      • 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