Package io.temporal.worker
Class WorkerFactoryOptions.Builder
- java.lang.Object
-
- io.temporal.worker.WorkerFactoryOptions.Builder
-
- Enclosing class:
- WorkerFactoryOptions
public static class WorkerFactoryOptions.Builder extends java.lang.Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description WorkerFactoryOptions
build()
WorkerFactoryOptions.Builder
setEnableLoggingInReplay(boolean enableLoggingInReplay)
WorkerFactoryOptions.Builder
setMaxWorkflowThreadCount(int maxWorkflowThreadCount)
Maximum number of threads available for workflow execution across all workers created by the Factory.WorkerFactoryOptions.Builder
setWorkerInterceptors(WorkerInterceptor... workerInterceptors)
WorkerFactoryOptions.Builder
setWorkflowCacheSize(int workflowCacheSize)
To avoid constant replay of code the workflow objects are cached on a worker.WorkerFactoryOptions.Builder
setWorkflowHostLocalPollThreadCount(int workflowHostLocalPollThreadCount)
Deprecated.not used anymore by JavaSDK, this value doesn't have any effectWorkerFactoryOptions.Builder
setWorkflowHostLocalTaskQueueScheduleToStartTimeout(java.time.Duration timeout)
Deprecated.useWorkerOptions.Builder.setStickyQueueScheduleToStartTimeout(Duration)
to specify this value per-worker insteadWorkerFactoryOptions
validateAndBuildWithDefaults()
-
-
-
Method Detail
-
setWorkflowCacheSize
public WorkerFactoryOptions.Builder setWorkflowCacheSize(int workflowCacheSize)
To avoid constant replay of code the workflow objects are cached on a worker. This cache is shared by all workers created by the Factory. Note that in the majority of situations the number of cached workflows is limited not by this value, but by the number of the threads defined throughsetMaxWorkflowThreadCount(int)
.Default value is 600
-
setMaxWorkflowThreadCount
public WorkerFactoryOptions.Builder setMaxWorkflowThreadCount(int maxWorkflowThreadCount)
Maximum number of threads available for workflow execution across all workers created by the Factory. This includes cached workflows.Default is 600
-
setWorkflowHostLocalTaskQueueScheduleToStartTimeout
@Deprecated public WorkerFactoryOptions.Builder setWorkflowHostLocalTaskQueueScheduleToStartTimeout(java.time.Duration timeout)
Deprecated.useWorkerOptions.Builder.setStickyQueueScheduleToStartTimeout(Duration)
to specify this value per-worker insteadTimeout for a workflow task routed to the "sticky worker" - host that has the workflow instance cached in memory. Once it times out, then it can be picked up by any worker.Default value is 5 seconds.
-
setWorkerInterceptors
public WorkerFactoryOptions.Builder setWorkerInterceptors(WorkerInterceptor... workerInterceptors)
-
setEnableLoggingInReplay
public WorkerFactoryOptions.Builder setEnableLoggingInReplay(boolean enableLoggingInReplay)
-
setWorkflowHostLocalPollThreadCount
@Deprecated public WorkerFactoryOptions.Builder setWorkflowHostLocalPollThreadCount(int workflowHostLocalPollThreadCount)
Deprecated.not used anymore by JavaSDK, this value doesn't have any effect
-
build
public WorkerFactoryOptions build()
-
validateAndBuildWithDefaults
public WorkerFactoryOptions validateAndBuildWithDefaults()
-
-