public static final class WorkerOptions.Builder
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
WorkerOptions |
build() |
WorkerOptions.Builder |
setActivityPollThreadCount(int activityPollThreadCount)
Number of simultaneous poll requests on activity task queue.
|
WorkerOptions.Builder |
setLocalActivityWorkerOnly(boolean localActivityWorkerOnly)
If set to true worker would only handle workflow tasks and local activities.
|
WorkerOptions.Builder |
setMaxConcurrentActivityExecutionSize(int maxConcurrentActivityExecutionSize)
Maximum number of parallely executed activities.
|
WorkerOptions.Builder |
setMaxConcurrentLocalActivityExecutionSize(int maxConcurrentLocalActivityExecutionSize)
Maximum number of parallely executed local activities.
|
WorkerOptions.Builder |
setMaxConcurrentWorkflowTaskExecutionSize(int maxConcurrentWorkflowTaskExecutionSize)
Maximum number of simultaneously executed workflow tasks.
|
WorkerOptions.Builder |
setMaxTaskQueueActivitiesPerSecond(double maxTaskQueueActivitiesPerSecond)
Optional: Sets the rate limiting on number of activities that can be executed per second.
|
WorkerOptions.Builder |
setMaxWorkerActivitiesPerSecond(double maxWorkerActivitiesPerSecond)
Maximum number of activities started per second by this worker.
|
WorkerOptions.Builder |
setWorkflowPollThreadCount(int workflowPollThreadCount)
Number of simultaneous poll requests on workflow task queue.
|
WorkerOptions |
validateAndBuildWithDefaults() |
public WorkerOptions.Builder setMaxWorkerActivitiesPerSecond(double maxWorkerActivitiesPerSecond)
setActivityPollThreadCount(int)
.
Note that this is a per worker limit. Use setMaxTaskQueueActivitiesPerSecond(double)
to set per task queue limit across multiple
workers.
public WorkerOptions.Builder setMaxConcurrentActivityExecutionSize(int maxConcurrentActivityExecutionSize)
Default is 200.
public WorkerOptions.Builder setMaxConcurrentWorkflowTaskExecutionSize(int maxConcurrentWorkflowTaskExecutionSize)
Default is 200.
public WorkerOptions.Builder setMaxConcurrentLocalActivityExecutionSize(int maxConcurrentLocalActivityExecutionSize)
Default is 200.
public WorkerOptions.Builder setMaxTaskQueueActivitiesPerSecond(double maxTaskQueueActivitiesPerSecond)
public WorkerOptions.Builder setWorkflowPollThreadCount(int workflowPollThreadCount)
WorkerFactoryOptions.Builder.setWorkflowHostLocalPollThreadCount(int)
before this one.
Default is 2.
public WorkerOptions.Builder setActivityPollThreadCount(int activityPollThreadCount)
Default is 5.
public WorkerOptions.Builder setLocalActivityWorkerOnly(boolean localActivityWorkerOnly)
Default is false.
public WorkerOptions build()
public WorkerOptions validateAndBuildWithDefaults()