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.EndpointServiceLocation,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
implements org.apache.camel.spi.EndpointServiceLocation
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
ConstructorsConstructorDescriptionCouchbaseEndpoint(String uri, String remaining, CouchbaseComponent component) CouchbaseEndpoint(String endpointUri, CouchbaseComponent component) -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.camel.ConsumercreateConsumer(org.apache.camel.Processor processor) org.apache.camel.ProducerThe collection to uselongintgetKey()intgetLimit()intintgetPort()intintlongintgetScope()intgetSkip()longlongCompares retry strategy with query timeout and gets the higher value : for write operations with retrybooleanbooleanbooleanURI[]voidsetAdditionalHosts(String additionalHosts) The additional hostsvoidsetAutoStartIdForInserts(boolean autoStartIdForInserts) Define if we want an autostart Id when we are doing an insert operationvoidThe bucket to usevoidsetCollection(String collection) voidsetConnectTimeout(long connectTimeout) Define the timeoutconnect in millisecondsvoidsetConsumerProcessedStrategy(String consumerProcessedStrategy) Define the consumer Processed strategy to usevoidsetConsumerRetryPause(int consumerRetryPause) Define the consumer retry pause between different attemptsvoidsetDescending(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 usevoidThe 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 producer 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 datavoidThe 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 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, setUseFixedDelayMethods 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, toStringMethods inherited from class org.apache.camel.support.service.BaseService
build, doBuild, doFail, doLifecycleChange, doResume, doShutdown, doStart, doStop, doSuspend, fail, getInternalLock, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspendMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.camel.ComponentAware
getComponentMethods inherited from interface org.apache.camel.Endpoint
getEndpointBaseUri, isRemote, isSingletonProducerMethods inherited from interface org.apache.camel.Service
build, close, init, start, stopMethods inherited from interface org.apache.camel.ShutdownableService
shutdownMethods inherited from interface org.apache.camel.StatefulService
getStatus, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspendingMethods 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
-
getServiceUrl
- Specified by:
getServiceUrlin interfaceorg.apache.camel.spi.EndpointServiceLocation
-
getServiceProtocol
- Specified by:
getServiceProtocolin interfaceorg.apache.camel.spi.EndpointServiceLocation
-
getServiceMetadata
- Specified by:
getServiceMetadatain interfaceorg.apache.camel.spi.EndpointServiceLocation
-
createProducer
- Specified by:
createProducerin interfaceorg.apache.camel.Endpoint- Throws:
Exception
-
createConsumer
public org.apache.camel.Consumer createConsumer(org.apache.camel.Processor processor) throws Exception - Specified by:
createConsumerin interfaceorg.apache.camel.Endpoint- 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 producer retry pause between different attempts -
getConsumerRetryPause
public int getConsumerRetryPause() -
setConsumerRetryPause
public void setConsumerRetryPause(int consumerRetryPause) Define the consumer 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:
-