Class CouchbaseEndpoint

java.lang.Object
org.apache.camel.support.service.BaseService
org.apache.camel.support.service.ServiceSupport
org.apache.camel.support.DefaultEndpoint
org.apache.camel.support.ScheduledPollEndpoint
org.apache.camel.component.couchbase.CouchbaseEndpoint
All Implemented Interfaces:
AutoCloseable, org.apache.camel.CamelContextAware, org.apache.camel.ComponentAware, org.apache.camel.Endpoint, org.apache.camel.IsSingleton, org.apache.camel.Service, org.apache.camel.ShutdownableService, org.apache.camel.spi.HasCamelContext, org.apache.camel.spi.HasId, org.apache.camel.StatefulService, org.apache.camel.SuspendableService

@UriEndpoint(firstVersion="2.19.0", scheme="couchbase", title="Couchbase", syntax="couchbase:protocol://hostname:port", category=DATABASE, headersClass=CouchbaseConstants.class) public class CouchbaseEndpoint extends org.apache.camel.support.ScheduledPollEndpoint
Query Couchbase Views with a poll strategy and/or perform various operations against Couchbase databases.
  • 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
  • Constructor Summary

    Constructors
    Constructor
    Description
     
    CouchbaseEndpoint(String uri, String remaining, CouchbaseComponent component)
     
    CouchbaseEndpoint(String endpointUri, CouchbaseComponent component)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.apache.camel.Consumer
    createConsumer(org.apache.camel.Processor processor)
     
    org.apache.camel.Producer
     
     
     
    The collection to use
    long
     
     
     
     
     
    int
     
     
     
    int
     
    int
     
    int
     
    int
     
     
    long
     
     
     
    int
     
     
    int
     
    long
     
     
     
    long
    Compares retry strategy with query timeout and gets the higher value : for write operations with retry
    boolean
     
    boolean
     
    boolean
     
    URI[]
     
    void
    setAdditionalHosts(String additionalHosts)
    The additional hosts
    void
    setAutoStartIdForInserts(boolean autoStartIdForInserts)
    Define if we want an autostart Id when we are doing an insert operation
    void
    setBucket(String bucket)
    The bucket to use
    void
    setCollection(String collection)
     
    void
    setConnectTimeout(long connectTimeout)
    Define the timeoutconnect in milliseconds
    void
    setConsumerProcessedStrategy(String consumerProcessedStrategy)
    Define the consumer Processed strategy to use
    void
    setDescending(boolean descending)
    Define if this operation is descending or not
    void
    setDesignDocumentName(String designDocumentName)
    The design document name to use
    void
    setFullDocument(boolean fullDocument)
    If true consumer will return complete document instead data defined in view
    void
    setHostname(String hostname)
    The hostname to use
    void
    The key to use
    void
    setLimit(int limit)
    The output limit to use
    void
    setOperation(String operation)
    The operation to do
    void
    setPassword(String password)
    The password to use
    void
    setPersistTo(int persistTo)
    Where to persist the data
    void
    setPort(int port)
    The port number to use
    void
    setProducerRetryAttempts(int producerRetryAttempts)
    Define the number of retry attempts
    void
    setProducerRetryPause(int producerRetryPause)
    Define the retry pause between different attempts
    void
    setProtocol(String protocol)
    The protocol to use
    void
    setQueryTimeout(long queryTimeout)
    Define the operation timeout in milliseconds
    void
    setRangeEndKey(String rangeEndKey)
    Define a range for the end key
    void
    setRangeStartKey(String rangeStartKey)
    Define a range for the start key
    void
    setReplicateTo(int replicateTo)
    Where to replicate the data
    void
    The scope to use
    void
    setSkip(int skip)
    Define the skip to use
    void
    setStartingIdForInsertsFrom(long startingIdForInsertsFrom)
    Define the starting Id where we are doing an insert operation
    void
    setUsername(String username)
    The username to use
    void
    setViewName(String viewName)
    The view name to use

    Methods inherited from class org.apache.camel.support.ScheduledPollEndpoint

    configureConsumer, configureProperties, configureScheduledPollConsumerProperties, doConfigureConsumer, getBackoffErrorThreshold, getBackoffIdleThreshold, getBackoffMultiplier, getDefaultDelay, getDelay, getInitialDelay, getPollStrategy, getRepeatCount, getRunLoggingLevel, getScheduledExecutorService, getScheduler, getSchedulerProperties, getTimeUnit, isGreedy, isSendEmptyMessageWhenIdle, isStartScheduler, isUseFixedDelay, setBackoffErrorThreshold, setBackoffIdleThreshold, setBackoffMultiplier, setDelay, setGreedy, setInitialDelay, setPollStrategy, setRepeatCount, setRunLoggingLevel, setScheduledExecutorService, setScheduler, setSchedulerProperties, setSendEmptyMessageWhenIdle, setStartScheduler, setTimeUnit, setUseFixedDelay

    Methods inherited from class org.apache.camel.support.DefaultEndpoint

    configureExchange, configurePollingConsumer, createAsyncProducer, createEndpointUri, createExchange, createExchange, createPollingConsumer, doInit, equals, getCamelContext, getComponent, getEndpointKey, getEndpointUri, getExceptionHandler, getExchangePattern, getId, getPollingConsumerBlockTimeout, getPollingConsumerQueueSize, hashCode, isAutowiredEnabled, isBridgeErrorHandler, isLazyStartProducer, isLenientProperties, isPollingConsumerBlockWhenFull, isPollingConsumerCopy, isSingleton, setAutowiredEnabled, setBridgeErrorHandler, setCamelContext, setComponent, setEndpointUri, setEndpointUriIfNotSpecified, setExceptionHandler, setExchangePattern, setLazyStartProducer, setPollingConsumerBlockTimeout, setPollingConsumerBlockWhenFull, setPollingConsumerCopy, setPollingConsumerQueueSize, setProperties, toString

    Methods inherited from class org.apache.camel.support.service.BaseService

    build, doBuild, doFail, doLifecycleChange, doResume, doShutdown, doStart, doStop, 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

    Methods inherited from interface org.apache.camel.ComponentAware

    getComponent

    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
  • Constructor Details

  • Method Details

    • createProducer

      public org.apache.camel.Producer createProducer() throws Exception
      Throws:
      Exception
    • createConsumer

      public org.apache.camel.Consumer createConsumer(org.apache.camel.Processor processor) throws Exception
      Throws:
      Exception
    • getProtocol

      public String getProtocol()
    • setProtocol

      public void setProtocol(String protocol)
      The protocol to use
    • getBucket

      public String getBucket()
    • setBucket

      public void setBucket(String bucket)
      The bucket to use
    • getHostname

      public String getHostname()
    • setHostname

      public void setHostname(String hostname)
      The hostname to use
    • getPort

      public int getPort()
    • setPort

      public void setPort(int port)
      The port number to use
    • getCollection

      public String getCollection()
      The collection to use
    • setCollection

      public void setCollection(String collection)
    • getScope

      public String getScope()
    • setScope

      public void setScope(String scope)
      The scope to use
    • getKey

      public String getKey()
    • setKey

      public void setKey(String key)
      The key to use
    • getUsername

      public String getUsername()
    • setUsername

      public void setUsername(String username)
      The username to use
    • getPassword

      public String getPassword()
    • setPassword

      public void setPassword(String password)
      The password to use
    • getAdditionalHosts

      public String getAdditionalHosts()
    • setAdditionalHosts

      public void setAdditionalHosts(String additionalHosts)
      The additional hosts
    • getPersistTo

      public int getPersistTo()
    • setPersistTo

      public void setPersistTo(int persistTo)
      Where to persist the data
    • getReplicateTo

      public int getReplicateTo()
    • setReplicateTo

      public void setReplicateTo(int replicateTo)
      Where to replicate the data
    • getOperation

      public String getOperation()
    • setOperation

      public void setOperation(String operation)
      The operation to do
    • isAutoStartIdForInserts

      public boolean isAutoStartIdForInserts()
    • setAutoStartIdForInserts

      public void setAutoStartIdForInserts(boolean autoStartIdForInserts)
      Define if we want an autostart Id when we are doing an insert operation
    • getStartingIdForInsertsFrom

      public long getStartingIdForInsertsFrom()
    • setStartingIdForInsertsFrom

      public void setStartingIdForInsertsFrom(long startingIdForInsertsFrom)
      Define the starting Id where we are doing an insert operation
    • getProducerRetryAttempts

      public int getProducerRetryAttempts()
    • setProducerRetryAttempts

      public void setProducerRetryAttempts(int producerRetryAttempts)
      Define the number of retry attempts
    • getProducerRetryPause

      public int getProducerRetryPause()
    • setProducerRetryPause

      public void setProducerRetryPause(int producerRetryPause)
      Define the retry pause between different attempts
    • getDesignDocumentName

      public String getDesignDocumentName()
    • setDesignDocumentName

      public void setDesignDocumentName(String designDocumentName)
      The design document name to use
    • getViewName

      public String getViewName()
    • setViewName

      public void setViewName(String viewName)
      The view name to use
    • getLimit

      public int getLimit()
    • setLimit

      public void setLimit(int limit)
      The output limit to use
    • isDescending

      public boolean isDescending()
    • setDescending

      public void setDescending(boolean descending)
      Define if this operation is descending or not
    • getSkip

      public int getSkip()
    • setSkip

      public void setSkip(int skip)
      Define the skip to use
    • getRangeStartKey

      public String getRangeStartKey()
    • setRangeStartKey

      public void setRangeStartKey(String rangeStartKey)
      Define a range for the start key
    • getRangeEndKey

      public String getRangeEndKey()
    • setRangeEndKey

      public void setRangeEndKey(String rangeEndKey)
      Define a range for the end key
    • isFullDocument

      public boolean isFullDocument()
    • setFullDocument

      public void setFullDocument(boolean fullDocument)
      If true consumer will return complete document instead data defined in view
    • getConsumerProcessedStrategy

      public String getConsumerProcessedStrategy()
    • setConsumerProcessedStrategy

      public void setConsumerProcessedStrategy(String consumerProcessedStrategy)
      Define the consumer Processed strategy to use
    • getQueryTimeout

      public long getQueryTimeout()
    • setQueryTimeout

      public void setQueryTimeout(long queryTimeout)
      Define the operation timeout in milliseconds
    • getConnectTimeout

      public long getConnectTimeout()
    • setConnectTimeout

      public void setConnectTimeout(long connectTimeout)
      Define the timeoutconnect in milliseconds
    • makeBootstrapURI

      public URI[] makeBootstrapURI() throws URISyntaxException
      Throws:
      URISyntaxException
    • getWriteQueryTimeout

      public long getWriteQueryTimeout()
      Compares retry strategy with query timeout and gets the higher value : for write operations with retry
      Returns: