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.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.19.0", scheme="couchbase", title="Couchbase", syntax="couchbase:protocol://hostname:port", category={DATABASE,NOSQL}, headersClass=CouchbaseConstants.class) public class CouchbaseEndpoint extends org.apache.camel.support.ScheduledPollEndpointQuery Couchbase Views with a poll strategy and/or perform various operations against Couchbase databases.
-
-
Constructor Summary
Constructors Constructor Description CouchbaseEndpoint()CouchbaseEndpoint(String uri, String remaining, CouchbaseComponent component)CouchbaseEndpoint(String endpointUri, CouchbaseComponent component)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.camel.ConsumercreateConsumer(org.apache.camel.Processor processor)org.apache.camel.ProducercreateProducer()StringgetAdditionalHosts()StringgetBucket()StringgetCollection()The collection to uselonggetConnectTimeout()StringgetConsumerProcessedStrategy()StringgetDesignDocumentName()StringgetHostname()StringgetKey()intgetLimit()StringgetOperation()StringgetPassword()intgetPersistTo()intgetPort()intgetProducerRetryAttempts()intgetProducerRetryPause()StringgetProtocol()longgetQueryTimeout()StringgetRangeEndKey()StringgetRangeStartKey()intgetReplicateTo()StringgetScope()intgetSkip()longgetStartingIdForInsertsFrom()StringgetUsername()StringgetViewName()longgetWriteQueryTimeout()Compares retry strategy with query timeout and gets the higher value : for write operations with retrybooleanisAutoStartIdForInserts()booleanisDescending()booleanisFullDocument()URI[]makeBootstrapURI()voidsetAdditionalHosts(String additionalHosts)The additional hostsvoidsetAutoStartIdForInserts(boolean autoStartIdForInserts)Define if we want an autostart Id when we are doing an insert operationvoidsetBucket(String bucket)The bucket to usevoidsetCollection(String collection)voidsetConnectTimeout(long connectTimeout)Define the timeoutconnect in millisecondsvoidsetConsumerProcessedStrategy(String consumerProcessedStrategy)Define the consumer Processed strategy to usevoidsetDescending(boolean descending)Define if this operation is descending or notvoidsetDesignDocumentName(String designDocumentName)The design document name to usevoidsetFullDocument(boolean fullDocument)If true consumer will return complete document instead data defined in viewvoidsetHostname(String hostname)The hostname to usevoidsetKey(String key)The key to usevoidsetLimit(int limit)The output limit to usevoidsetOperation(String operation)The operation to dovoidsetPassword(String password)The password to usevoidsetPersistTo(int persistTo)Where to persist the datavoidsetPort(int port)The port number to usevoidsetProducerRetryAttempts(int producerRetryAttempts)Define the number of retry attemptsvoidsetProducerRetryPause(int producerRetryPause)Define the retry pause between different attemptsvoidsetProtocol(String protocol)The protocol to usevoidsetQueryTimeout(long queryTimeout)Define the operation timeout in millisecondsvoidsetRangeEndKey(String rangeEndKey)Define a range for the end keyvoidsetRangeStartKey(String rangeStartKey)Define a range for the start keyvoidsetReplicateTo(int replicateTo)Where to replicate the datavoidsetScope(String scope)The scope to usevoidsetSkip(int skip)Define the skip to usevoidsetStartingIdForInsertsFrom(long startingIdForInsertsFrom)Define the starting Id where we are doing an insert operationvoidsetUsername(String username)The username to usevoidsetViewName(String viewName)The view name to use-
Methods inherited from class org.apache.camel.support.ScheduledPollEndpoint
configureConsumer, configureProperties, configureScheduledPollConsumerProperties, doConfigureConsumer, doStart, doStop, 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, 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
-
CouchbaseEndpoint
public CouchbaseEndpoint()
-
CouchbaseEndpoint
public CouchbaseEndpoint(String uri, String remaining, CouchbaseComponent component) throws URISyntaxException
- Throws:
URISyntaxException
-
CouchbaseEndpoint
public CouchbaseEndpoint(String endpointUri, CouchbaseComponent component)
-
-
Method Detail
-
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:
-
-