Class EventingFunctionSettings.Builder
java.lang.Object
com.couchbase.client.java.manager.eventing.EventingFunctionSettings.Builder
- Enclosing class:
- EventingFunctionSettings
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionDirectory to write content of log() message files.appLogMaxFiles
(long appLogMaxFiles) Number of log() message files to retain when rotating.appLogMaxSize
(long appLogMaxSize) Rotate logs when file grows to this size in bytes approximately.bucketCacheAge
(long bucketCacheAge) Time in milliseconds after which a cached bucket object is considered stale.bucketCacheSize
(long bucketCacheSize) Maximum size in bytes the bucket cache can grow to.build()
Builds theEventingFunctionSettings
.checkpointInterval
(Duration checkpointInterval) Number of seconds before writing a progress checkpoint.cppWorkerThreadCount
(long cppWorkerThreadCount) Number of threads each worker utilizes.curlMaxAllowedRespSize
(long curlMaxAllowedRespSize) Maximum allowable curl call response in 'MegaBytes'.dcpStreamBoundary
(EventingFunctionDcpBoundary dcpStreamBoundary) Indicates where to start dcp stream from (beginning of time, present point).description
(String description) Free form text for user to describe the handler.enableAppLogRotation
(boolean enableAppLogRotation) Enable rotating this handlers log() message files.executionTimeout
(Duration executionTimeout) Maximum time the handler can run before it is forcefully terminated.handlerFooters
(List<String> handlerFooters) Code to automatically append to bottom of handler code.handlerHeaders
(List<String> handlerHeaders) Code to automatically prepend to top of handler code.languageCompatibility
(EventingFunctionLanguageCompatibility languageCompatibility) Eventing language version this handler assumes in terms of syntax and behavior.lcbInstCapacity
(long lcbInstCapacity) Maximum number of libcouchbase connections that may be opened and pooled.lcbRetryCount
(long lcbRetryCount) Number of retries of retriable libcouchbase failures.lcbTimeout
(Duration lcbTimeout) Maximum time the lcb command is waited until completion before we terminate the request.logLevel
(EventingFunctionLogLevel logLevel) Level of detail in system logging.numTimerPartitions
(long numTimerPartitions) Number of timer shards.queryConsistency
(QueryScanConsistency queryConsistency) Consistency level used by n1ql statements in the handler.queryPrepareAll
(boolean queryPrepareAll) Automatically prepare all n1ql statements in the handler.sockBatchSize
(long sockBatchSize) Batch size for messages from producer to consumer.tickDuration
(Duration tickDuration) Duration to log stats from this handler.timerContextSize
(long timerContextSize) Size limit of timer context object.userPrefix
(String userPrefix) Key prefix for all data stored in metadata by this handler.workerCount
(long workerCount) Number of worker processes handler utilizes on each eventing node.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
checkpointInterval
Number of seconds before writing a progress checkpoint.- Parameters:
checkpointInterval
- number of seconds before writing a progress checkpoint.- Returns:
- this
EventingFunctionSettings.Builder
for chaining purposes.
-
appLogMaxFiles
Number of log() message files to retain when rotating.- Parameters:
appLogMaxFiles
- number of log() message files to retain when rotating.- Returns:
- this
EventingFunctionSettings.Builder
for chaining purposes.
-
appLogMaxSize
Rotate logs when file grows to this size in bytes approximately.- Parameters:
appLogMaxSize
- rotate logs when file grows to this size in bytes approximately.- Returns:
- this
EventingFunctionSettings.Builder
for chaining purposes.
-
appLogDir
Directory to write content of log() message files.- Parameters:
appLogDir
- directory to write content of log() message files.- Returns:
- this
EventingFunctionSettings.Builder
for chaining purposes.
-
enableAppLogRotation
Enable rotating this handlers log() message files.- Parameters:
enableAppLogRotation
- enable rotating this handlers log() message files.- Returns:
- this
EventingFunctionSettings.Builder
for chaining purposes.
-
handlerHeaders
Code to automatically prepend to top of handler code.- Parameters:
handlerHeaders
- code to automatically prepend to top of handler code.- Returns:
- this
EventingFunctionSettings.Builder
for chaining purposes.
-
queryPrepareAll
Automatically prepare all n1ql statements in the handler.- Parameters:
queryPrepareAll
- automatically prepare all n1ql statements in the handler.- Returns:
- this
EventingFunctionSettings.Builder
for chaining purposes.
-
workerCount
Number of worker processes handler utilizes on each eventing node.- Parameters:
workerCount
- number of worker processes handler utilizes on each eventing node.- Returns:
- this
EventingFunctionSettings.Builder
for chaining purposes.
-
cppWorkerThreadCount
Number of threads each worker utilizes.- Parameters:
cppWorkerThreadCount
- number of threads each worker utilizes.- Returns:
- this
EventingFunctionSettings.Builder
for chaining purposes.
-
dcpStreamBoundary
public EventingFunctionSettings.Builder dcpStreamBoundary(EventingFunctionDcpBoundary dcpStreamBoundary) Indicates where to start dcp stream from (beginning of time, present point).- Parameters:
dcpStreamBoundary
- indicates where to start dcp stream from (beginning of time, present point).- Returns:
- this
EventingFunctionSettings.Builder
for chaining purposes.
-
description
Free form text for user to describe the handler. no functional role.- Parameters:
description
- free form text for user to describe the handler. no functional role.- Returns:
- this
EventingFunctionSettings.Builder
for chaining purposes.
-
logLevel
Level of detail in system logging.- Parameters:
logLevel
- level of detail in system logging.- Returns:
- this
EventingFunctionSettings.Builder
for chaining purposes.
-
languageCompatibility
public EventingFunctionSettings.Builder languageCompatibility(EventingFunctionLanguageCompatibility languageCompatibility) Eventing language version this handler assumes in terms of syntax and behavior.- Parameters:
languageCompatibility
- eventing language version this handler assumes in terms of syntax and behavior.- Returns:
- this
EventingFunctionSettings.Builder
for chaining purposes.
-
executionTimeout
Maximum time the handler can run before it is forcefully terminated.- Parameters:
executionTimeout
- maximum time the handler can run before it is forcefully terminated.- Returns:
- this
EventingFunctionSettings.Builder
for chaining purposes.
-
lcbInstCapacity
Maximum number of libcouchbase connections that may be opened and pooled.- Parameters:
lcbInstCapacity
- maximum number of libcouchbase connections that may be opened and pooled.- Returns:
- this
EventingFunctionSettings.Builder
for chaining purposes.
-
lcbRetryCount
Number of retries of retriable libcouchbase failures. 0 keeps trying till execution_timeout.- Parameters:
lcbRetryCount
- number of retries of retriable libcouchbase failures. 0 keeps trying till execution_timeout.- Returns:
- this
EventingFunctionSettings.Builder
for chaining purposes.
-
lcbTimeout
Maximum time the lcb command is waited until completion before we terminate the request.- Parameters:
lcbTimeout
- maximum time the lcb command is waited until completion before we terminate the request.- Returns:
- this
EventingFunctionSettings.Builder
for chaining purposes.
-
queryConsistency
Consistency level used by n1ql statements in the handler.- Parameters:
queryConsistency
- consistency level used by n1ql statements in the handler.- Returns:
- this
EventingFunctionSettings.Builder
for chaining purposes.
-
numTimerPartitions
Number of timer shards. defaults to number of vbuckets.- Parameters:
numTimerPartitions
- number of timer shards. defaults to number of vbuckets.- Returns:
- this
EventingFunctionSettings.Builder
for chaining purposes.
-
sockBatchSize
Batch size for messages from producer to consumer. normally, this must not be specified.- Parameters:
sockBatchSize
- batch size for messages from producer to consumer. normally, this must not be specified.- Returns:
- this
EventingFunctionSettings.Builder
for chaining purposes.
-
tickDuration
Duration to log stats from this handler.- Parameters:
tickDuration
- duration to log stats from this handler.- Returns:
- this
EventingFunctionSettings.Builder
for chaining purposes.
-
timerContextSize
Size limit of timer context object.- Parameters:
timerContextSize
- size limit of timer context object.- Returns:
- this
EventingFunctionSettings.Builder
for chaining purposes.
-
userPrefix
Key prefix for all data stored in metadata by this handler.- Parameters:
userPrefix
- key prefix for all data stored in metadata by this handler.- Returns:
- this
EventingFunctionSettings.Builder
for chaining purposes.
-
bucketCacheSize
Maximum size in bytes the bucket cache can grow to.- Parameters:
bucketCacheSize
- maximum size in bytes the bucket cache can grow to.- Returns:
- this
EventingFunctionSettings.Builder
for chaining purposes.
-
bucketCacheAge
Time in milliseconds after which a cached bucket object is considered stale.- Parameters:
bucketCacheAge
- time in milliseconds after which a cached bucket object is considered stale.- Returns:
- this
EventingFunctionSettings.Builder
for chaining purposes.
-
curlMaxAllowedRespSize
Maximum allowable curl call response in 'MegaBytes'.Setting the value to 0 lifts the upper limit off. This parameter affects v8 engine stability since it defines the maximum amount of heap space acquired by a curl call.
- Parameters:
curlMaxAllowedRespSize
- maximum allowable curl call response in 'MegaBytes'.- Returns:
- this
EventingFunctionSettings.Builder
for chaining purposes.
-
build
Builds theEventingFunctionSettings
.
-