Class EventingFunctionSettings.Builder
- java.lang.Object
-
- com.couchbase.client.java.manager.eventing.EventingFunctionSettings.Builder
-
- Enclosing class:
- EventingFunctionSettings
public static class EventingFunctionSettings.Builder extends Object
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EventingFunctionSettings.BuilderappLogDir(String appLogDir)Directory to write content of log() message files.EventingFunctionSettings.BuilderappLogMaxFiles(long appLogMaxFiles)Number of log() message files to retain when rotating.EventingFunctionSettings.BuilderappLogMaxSize(long appLogMaxSize)Rotate logs when file grows to this size in bytes approximately.EventingFunctionSettings.BuilderbucketCacheAge(long bucketCacheAge)Time in milliseconds after which a cached bucket object is considered stale.EventingFunctionSettings.BuilderbucketCacheSize(long bucketCacheSize)Maximum size in bytes the bucket cache can grow to.EventingFunctionSettingsbuild()Builds theEventingFunctionSettings.EventingFunctionSettings.BuildercheckpointInterval(Duration checkpointInterval)Number of seconds before writing a progress checkpoint.EventingFunctionSettings.BuildercppWorkerThreadCount(long cppWorkerThreadCount)Number of threads each worker utilizes.EventingFunctionSettings.BuildercurlMaxAllowedRespSize(long curlMaxAllowedRespSize)Maximum allowable curl call response in 'MegaBytes'.EventingFunctionSettings.BuilderdcpStreamBoundary(EventingFunctionDcpBoundary dcpStreamBoundary)Indicates where to start dcp stream from (beginning of time, present point).EventingFunctionSettings.Builderdescription(String description)Free form text for user to describe the handler.EventingFunctionSettings.BuilderenableAppLogRotation(boolean enableAppLogRotation)Enable rotating this handlers log() message files.EventingFunctionSettings.BuilderexecutionTimeout(Duration executionTimeout)Maximum time the handler can run before it is forcefully terminated.EventingFunctionSettings.BuilderhandlerFooters(List<String> handlerFooters)Code to automatically append to bottom of handler code.EventingFunctionSettings.BuilderhandlerHeaders(List<String> handlerHeaders)Code to automatically prepend to top of handler code.EventingFunctionSettings.BuilderlanguageCompatibility(EventingFunctionLanguageCompatibility languageCompatibility)Eventing language version this handler assumes in terms of syntax and behavior.EventingFunctionSettings.BuilderlcbInstCapacity(long lcbInstCapacity)Maximum number of libcouchbase connections that may be opened and pooled.EventingFunctionSettings.BuilderlcbRetryCount(long lcbRetryCount)Number of retries of retriable libcouchbase failures.EventingFunctionSettings.BuilderlcbTimeout(Duration lcbTimeout)Maximum time the lcb command is waited until completion before we terminate the request.EventingFunctionSettings.BuilderlogLevel(EventingFunctionLogLevel logLevel)Level of detail in system logging.EventingFunctionSettings.BuildernumTimerPartitions(long numTimerPartitions)Number of timer shards.EventingFunctionSettings.BuilderqueryConsistency(QueryScanConsistency queryConsistency)Consistency level used by n1ql statements in the handler.EventingFunctionSettings.BuilderqueryPrepareAll(boolean queryPrepareAll)Automatically prepare all n1ql statements in the handler.EventingFunctionSettings.BuildersockBatchSize(long sockBatchSize)Batch size for messages from producer to consumer.EventingFunctionSettings.BuildertickDuration(Duration tickDuration)Duration to log stats from this handler.EventingFunctionSettings.BuildertimerContextSize(long timerContextSize)Size limit of timer context object.EventingFunctionSettings.BuilderuserPrefix(String userPrefix)Key prefix for all data stored in metadata by this handler.EventingFunctionSettings.BuilderworkerCount(long workerCount)Number of worker processes handler utilizes on each eventing node.
-
-
-
Method Detail
-
checkpointInterval
public EventingFunctionSettings.Builder checkpointInterval(Duration checkpointInterval)
Number of seconds before writing a progress checkpoint.- Parameters:
checkpointInterval- number of seconds before writing a progress checkpoint.- Returns:
- this
EventingFunctionSettings.Builderfor chaining purposes.
-
appLogMaxFiles
public EventingFunctionSettings.Builder appLogMaxFiles(long appLogMaxFiles)
Number of log() message files to retain when rotating.- Parameters:
appLogMaxFiles- number of log() message files to retain when rotating.- Returns:
- this
EventingFunctionSettings.Builderfor chaining purposes.
-
appLogMaxSize
public EventingFunctionSettings.Builder appLogMaxSize(long 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.Builderfor chaining purposes.
-
appLogDir
public EventingFunctionSettings.Builder appLogDir(String appLogDir)
Directory to write content of log() message files.- Parameters:
appLogDir- directory to write content of log() message files.- Returns:
- this
EventingFunctionSettings.Builderfor chaining purposes.
-
enableAppLogRotation
public EventingFunctionSettings.Builder enableAppLogRotation(boolean enableAppLogRotation)
Enable rotating this handlers log() message files.- Parameters:
enableAppLogRotation- enable rotating this handlers log() message files.- Returns:
- this
EventingFunctionSettings.Builderfor chaining purposes.
-
handlerFooters
public EventingFunctionSettings.Builder handlerFooters(List<String> handlerFooters)
Code to automatically append to bottom of handler code.- Parameters:
handlerFooters- code to automatically append to bottom of handler code.- Returns:
- this
EventingFunctionSettings.Builderfor chaining purposes.
-
handlerHeaders
public EventingFunctionSettings.Builder handlerHeaders(List<String> handlerHeaders)
Code to automatically prepend to top of handler code.- Parameters:
handlerHeaders- code to automatically prepend to top of handler code.- Returns:
- this
EventingFunctionSettings.Builderfor chaining purposes.
-
queryPrepareAll
public EventingFunctionSettings.Builder queryPrepareAll(boolean queryPrepareAll)
Automatically prepare all n1ql statements in the handler.- Parameters:
queryPrepareAll- automatically prepare all n1ql statements in the handler.- Returns:
- this
EventingFunctionSettings.Builderfor chaining purposes.
-
workerCount
public EventingFunctionSettings.Builder workerCount(long 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.Builderfor chaining purposes.
-
cppWorkerThreadCount
public EventingFunctionSettings.Builder cppWorkerThreadCount(long cppWorkerThreadCount)
Number of threads each worker utilizes.- Parameters:
cppWorkerThreadCount- number of threads each worker utilizes.- Returns:
- this
EventingFunctionSettings.Builderfor 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.Builderfor chaining purposes.
-
description
public EventingFunctionSettings.Builder description(String 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.Builderfor chaining purposes.
-
logLevel
public EventingFunctionSettings.Builder logLevel(EventingFunctionLogLevel logLevel)
Level of detail in system logging.- Parameters:
logLevel- level of detail in system logging.- Returns:
- this
EventingFunctionSettings.Builderfor 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.Builderfor chaining purposes.
-
executionTimeout
public EventingFunctionSettings.Builder executionTimeout(Duration 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.Builderfor chaining purposes.
-
lcbInstCapacity
public EventingFunctionSettings.Builder lcbInstCapacity(long 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.Builderfor chaining purposes.
-
lcbRetryCount
public EventingFunctionSettings.Builder lcbRetryCount(long 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.Builderfor chaining purposes.
-
lcbTimeout
public EventingFunctionSettings.Builder lcbTimeout(Duration 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.Builderfor chaining purposes.
-
queryConsistency
public EventingFunctionSettings.Builder queryConsistency(QueryScanConsistency queryConsistency)
Consistency level used by n1ql statements in the handler.- Parameters:
queryConsistency- consistency level used by n1ql statements in the handler.- Returns:
- this
EventingFunctionSettings.Builderfor chaining purposes.
-
numTimerPartitions
public EventingFunctionSettings.Builder numTimerPartitions(long numTimerPartitions)
Number of timer shards. defaults to number of vbuckets.- Parameters:
numTimerPartitions- number of timer shards. defaults to number of vbuckets.- Returns:
- this
EventingFunctionSettings.Builderfor chaining purposes.
-
sockBatchSize
public EventingFunctionSettings.Builder sockBatchSize(long 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.Builderfor chaining purposes.
-
tickDuration
public EventingFunctionSettings.Builder tickDuration(Duration tickDuration)
Duration to log stats from this handler.- Parameters:
tickDuration- duration to log stats from this handler.- Returns:
- this
EventingFunctionSettings.Builderfor chaining purposes.
-
timerContextSize
public EventingFunctionSettings.Builder timerContextSize(long timerContextSize)
Size limit of timer context object.- Parameters:
timerContextSize- size limit of timer context object.- Returns:
- this
EventingFunctionSettings.Builderfor chaining purposes.
-
userPrefix
public EventingFunctionSettings.Builder userPrefix(String 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.Builderfor chaining purposes.
-
bucketCacheSize
public EventingFunctionSettings.Builder bucketCacheSize(long 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.Builderfor chaining purposes.
-
bucketCacheAge
public EventingFunctionSettings.Builder bucketCacheAge(long 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.Builderfor chaining purposes.
-
curlMaxAllowedRespSize
public EventingFunctionSettings.Builder curlMaxAllowedRespSize(long 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.Builderfor chaining purposes.
-
build
public EventingFunctionSettings build()
Builds theEventingFunctionSettings.
-
-