public static final class WorkerOptions.Builder
extends java.lang.Object
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
WorkerOptions |
build() |
WorkerOptions.Builder |
setActivityPollerOptions(PollerOptions activityPollerOptions) |
WorkerOptions.Builder |
setDataConverter(DataConverter dataConverter)
Override a data converter implementation used by workflows and activities executed by this
worker.
|
WorkerOptions.Builder |
setDisableActivityWorker(boolean disableActivityWorker)
When set to true doesn't poll on activity task list even if there are registered activities
with a worker.
|
WorkerOptions.Builder |
setDisableWorkflowWorker(boolean disableWorkflowWorker)
When set to true doesn't poll on workflow task list even if there are registered workflows
with a worker.
|
WorkerOptions.Builder |
setEnableLoggingInReplay(boolean enableLoggingInReplay) |
WorkerOptions.Builder |
setIdentity(java.lang.String identity)
Override human readable identity of the worker.
|
WorkerOptions.Builder |
setInterceptorFactory(java.util.function.Function<WorkflowInterceptor,WorkflowInterceptor> interceptorFactory) |
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 |
setMaxConcurrentWorkflowExecutionSize(int maxConcurrentWorkflowExecutionSize)
Maximum number of parallely executed decision tasks.
|
WorkerOptions.Builder |
setMetricsScope(com.uber.m3.tally.Scope metricsScope) |
WorkerOptions.Builder |
setReportActivityCompletionRetryOptions(RetryOptions reportActivityCompletionRetryOptions) |
WorkerOptions.Builder |
setReportActivityFailureRetryOptions(RetryOptions reportActivityFailureRetryOptions) |
WorkerOptions.Builder |
setReportWorkflowCompletionRetryOptions(RetryOptions reportWorkflowCompletionRetryOptions) |
WorkerOptions.Builder |
setReportWorkflowFailureRetryOptions(RetryOptions reportWorkflowFailureRetryOptions) |
WorkerOptions.Builder |
setTaskListActivitiesPerSecond(double taskListActivitiesPerSecond)
Optional: Sets the rate limiting on number of activities that can be executed per second.
|
WorkerOptions.Builder |
setWorkerActivitiesPerSecond(double workerActivitiesPerSecond)
Maximum number of activities started per second.
|
WorkerOptions.Builder |
setWorkflowPollerOptions(PollerOptions workflowPollerOptions) |
public WorkerOptions.Builder setDisableWorkflowWorker(boolean disableWorkflowWorker)
Worker
to
setting this option. But it can be useful for disabling polling through configuration without
a code change.public WorkerOptions.Builder setDisableActivityWorker(boolean disableActivityWorker)
Worker
to setting this option. But it can be useful for disabling polling through
configuration without a code change.public WorkerOptions.Builder setIdentity(java.lang.String identity)
(ManagementFactory.getRuntimeMXBean().getName()
returns.public WorkerOptions.Builder setDataConverter(DataConverter dataConverter)
JsonDataConverter
data converter.public WorkerOptions.Builder setWorkerActivitiesPerSecond(double workerActivitiesPerSecond)
public WorkerOptions.Builder setMaxConcurrentActivityExecutionSize(int maxConcurrentActivityExecutionSize)
public WorkerOptions.Builder setMaxConcurrentWorkflowExecutionSize(int maxConcurrentWorkflowExecutionSize)
public WorkerOptions.Builder setMaxConcurrentLocalActivityExecutionSize(int maxConcurrentLocalActivityExecutionSize)
public WorkerOptions.Builder setActivityPollerOptions(PollerOptions activityPollerOptions)
public WorkerOptions.Builder setWorkflowPollerOptions(PollerOptions workflowPollerOptions)
public WorkerOptions.Builder setReportActivityCompletionRetryOptions(RetryOptions reportActivityCompletionRetryOptions)
public WorkerOptions.Builder setReportActivityFailureRetryOptions(RetryOptions reportActivityFailureRetryOptions)
public WorkerOptions.Builder setReportWorkflowCompletionRetryOptions(RetryOptions reportWorkflowCompletionRetryOptions)
public WorkerOptions.Builder setReportWorkflowFailureRetryOptions(RetryOptions reportWorkflowFailureRetryOptions)
public WorkerOptions.Builder setInterceptorFactory(java.util.function.Function<WorkflowInterceptor,WorkflowInterceptor> interceptorFactory)
public WorkerOptions.Builder setMetricsScope(com.uber.m3.tally.Scope metricsScope)
public WorkerOptions.Builder setEnableLoggingInReplay(boolean enableLoggingInReplay)
public WorkerOptions.Builder setTaskListActivitiesPerSecond(double taskListActivitiesPerSecond)
public WorkerOptions build()