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
ConstructorDescriptionCouchbaseEndpoint
(String uri, String remaining, CouchbaseComponent component) CouchbaseEndpoint
(String endpointUri, CouchbaseComponent component) -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.camel.Consumer
createConsumer
(org.apache.camel.Processor processor) org.apache.camel.Producer
The collection to uselong
getKey()
int
getLimit()
int
int
getPort()
int
int
long
int
getScope()
int
getSkip()
long
long
Compares retry strategy with query timeout and gets the higher value : for write operations with retryboolean
boolean
boolean
URI[]
void
setAdditionalHosts
(String additionalHosts) The additional hostsvoid
setAutoStartIdForInserts
(boolean autoStartIdForInserts) Define if we want an autostart Id when we are doing an insert operationvoid
The bucket to usevoid
setCollection
(String collection) void
setConnectTimeout
(long connectTimeout) Define the timeoutconnect in millisecondsvoid
setConsumerProcessedStrategy
(String consumerProcessedStrategy) Define the consumer Processed strategy to usevoid
setDescending
(boolean descending) Define if this operation is descending or notvoid
setDesignDocumentName
(String designDocumentName) The design document name to usevoid
setFullDocument
(boolean fullDocument) If true consumer will return complete document instead data defined in viewvoid
setHostname
(String hostname) The hostname to usevoid
The key to usevoid
setLimit
(int limit) The output limit to usevoid
setOperation
(String operation) The operation to dovoid
setPassword
(String password) The password to usevoid
setPersistTo
(int persistTo) Where to persist the datavoid
setPort
(int port) The port number to usevoid
setProducerRetryAttempts
(int producerRetryAttempts) Define the number of retry attemptsvoid
setProducerRetryPause
(int producerRetryPause) Define the retry pause between different attemptsvoid
setProtocol
(String protocol) The protocol to usevoid
setQueryTimeout
(long queryTimeout) Define the operation timeout in millisecondsvoid
setRangeEndKey
(String rangeEndKey) Define a range for the end keyvoid
setRangeStartKey
(String rangeStartKey) Define a range for the start keyvoid
setReplicateTo
(int replicateTo) Where to replicate the datavoid
The scope to usevoid
setSkip
(int skip) Define the skip to usevoid
setStartingIdForInsertsFrom
(long startingIdForInsertsFrom) Define the starting Id where we are doing an insert operationvoid
setUsername
(String username) The username to usevoid
setViewName
(String viewName) The view name to useMethods 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
-
CouchbaseEndpoint
public CouchbaseEndpoint() -
CouchbaseEndpoint
public CouchbaseEndpoint(String uri, String remaining, CouchbaseComponent component) throws URISyntaxException - Throws:
URISyntaxException
-
CouchbaseEndpoint
-
-
Method Details
-
createProducer
- Throws:
Exception
-
createConsumer
public org.apache.camel.Consumer createConsumer(org.apache.camel.Processor processor) throws Exception - Throws:
Exception
-
getProtocol
-
setProtocol
The protocol to use -
getBucket
-
setBucket
The bucket to use -
getHostname
-
setHostname
The hostname to use -
getPort
public int getPort() -
setPort
public void setPort(int port) The port number to use -
getCollection
The collection to use -
setCollection
-
getScope
-
setScope
The scope to use -
getKey
-
setKey
The key to use -
getUsername
-
setUsername
The username to use -
getPassword
-
setPassword
The password to use -
getAdditionalHosts
-
setAdditionalHosts
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
-
setOperation
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
-
setDesignDocumentName
The design document name to use -
getViewName
-
setViewName
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
-
setRangeStartKey
Define a range for the start key -
getRangeEndKey
-
setRangeEndKey
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
-
setConsumerProcessedStrategy
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
- Throws:
URISyntaxException
-
getWriteQueryTimeout
public long getWriteQueryTimeout()Compares retry strategy with query timeout and gets the higher value : for write operations with retry- Returns:
-