public static class WorkflowTaskCoordinator.Builder
extends java.lang.Object
| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
WorkflowTaskCoordinator |
build()
Builds an instance of the WorkflowTaskCoordinator.
|
WorkflowTaskCoordinator.Builder |
withEurekaClient(com.netflix.discovery.EurekaClient eurekaClient) |
WorkflowTaskCoordinator.Builder |
withSleepWhenRetry(int sleepWhenRetry) |
WorkflowTaskCoordinator.Builder |
withTaskClient(TaskClient client) |
WorkflowTaskCoordinator.Builder |
withThreadCount(int threadCount) |
WorkflowTaskCoordinator.Builder |
withUpdateRetryCount(int updateRetryCount) |
WorkflowTaskCoordinator.Builder |
withWorkerNamePrefix(java.lang.String workerNamePrefix) |
WorkflowTaskCoordinator.Builder |
withWorkerQueueSize(int workerQueueSize) |
WorkflowTaskCoordinator.Builder |
withWorkers(java.lang.Iterable<Worker> taskWorkers) |
WorkflowTaskCoordinator.Builder |
withWorkers(Worker... taskWorkers) |
public WorkflowTaskCoordinator.Builder withWorkerNamePrefix(java.lang.String workerNamePrefix)
workerNamePrefix - prefix to be used for worker names, defaults to workflow-worker- if not supplied.public WorkflowTaskCoordinator.Builder withSleepWhenRetry(int sleepWhenRetry)
sleepWhenRetry - time in millisecond, for which the thread should sleep when task update call fails, before retrying the operation.public WorkflowTaskCoordinator.Builder withUpdateRetryCount(int updateRetryCount)
updateRetryCount - # of attempts to be made when updating task status when update status call fails.withSleepWhenRetry(int)public WorkflowTaskCoordinator.Builder withWorkerQueueSize(int workerQueueSize)
workerQueueSize - Worker queue size.public WorkflowTaskCoordinator.Builder withThreadCount(int threadCount)
threadCount - # of threads assigned to the workers. Should be at-least the size of taskWorkers to avoid starvation in a busy system.public WorkflowTaskCoordinator.Builder withTaskClient(TaskClient client)
client - Task Client used to communicate to Conductor serverpublic WorkflowTaskCoordinator.Builder withEurekaClient(com.netflix.discovery.EurekaClient eurekaClient)
eurekaClient - Eureka clientpublic WorkflowTaskCoordinator.Builder withWorkers(java.lang.Iterable<Worker> taskWorkers)
taskWorkers - workers that will be used for polling work and task execution.public WorkflowTaskCoordinator.Builder withWorkers(Worker... taskWorkers)
taskWorkers - workers that will be used for polling work and task execution.public WorkflowTaskCoordinator build()
Please see WorkflowTaskCoordinator.init() method. The method must be called after this constructor for the polling to start.