public class WorkflowTaskCoordinator
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
WorkflowTaskCoordinator.Builder
Builder used to create the instances of WorkflowTaskCoordinator
|
| Constructor and Description |
|---|
WorkflowTaskCoordinator(com.netflix.discovery.EurekaClient ec,
TaskClient client,
int threadCount,
int sleepWhenRetry,
int updateRetryCount,
int workerQueueSize,
java.lang.Iterable<Worker> taskWorkers) |
| Modifier and Type | Method and Description |
|---|---|
int |
getSleepWhenRetry() |
int |
getThreadCount() |
int |
getUpdateRetryCount() |
int |
getWorkerQueueSize() |
void |
init()
Starts the polling
|
public WorkflowTaskCoordinator(com.netflix.discovery.EurekaClient ec,
TaskClient client,
int threadCount,
int sleepWhenRetry,
int updateRetryCount,
int workerQueueSize,
java.lang.Iterable<Worker> taskWorkers)
ec - Eureka client - used to identify if the server is in discovery or not. When the server goes out of discovery, the polling is terminated. If passed null, discovery check is not done.client - TaskClient used to communicate to the Conductor serverthreadCount - # of threads assigned to the workers. Should be at-least the size of taskWorkers to avoid starvation in a busy system.sleepWhenRetry - sleep time in millisecond for Conductor server retries (poll, ack, update task)updateRetryCount - number of times to retry the failed updateTask operationworkerQueueSize - queue size for the polled task.taskWorkers - workers that will be used for polling work and task execution.
Please see init() method. The method must be called after this constructor for the polling to start.
WorkflowTaskCoordinator.Builderpublic void init()
public int getThreadCount()
public int getWorkerQueueSize()
public int getSleepWhenRetry()
public int getUpdateRetryCount()