Class TaskRunnerConfigurer.Builder
java.lang.Object
com.netflix.conductor.client.automator.TaskRunnerConfigurer.Builder
- Enclosing class:
- TaskRunnerConfigurer
Builder used to create the instances of TaskRunnerConfigurer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds an instance of the TaskRunnerConfigurer.withConductorClientConfiguration(ConductorClientConfiguration conductorClientConfiguration) <T extends TaskRunnerEvent>
TaskRunnerConfigurer.BuilderwithListener(Class<T> eventType, Consumer<T> listener) withMetricsCollector(MetricsCollector metricsCollector) withPollFilter(PollFilter filter) withShutdownGracePeriodSeconds(int shutdownGracePeriodSeconds) withSleepWhenRetry(int sleepWhenRetry) withTaskPollCount(int defaultPollCount) withTaskPollCount(Map<String, Integer> taskPollCount) withTaskPollTimeout(Integer taskPollTimeout) withTaskPollTimeout(Map<String, Integer> taskPollTimeout) withTaskThreadCount(Map<String, Integer> taskToThreadCount) withTaskToDomain(Map<String, String> taskToDomain) withTaskToThreadCount(Map<String, Integer> taskToThreadCount) withThreadCount(int threadCount) withUpdateRetryCount(int updateRetryCount) withWorkerNamePrefix(String workerNamePrefix)
-
Constructor Details
-
Builder
-
-
Method Details
-
withWorkerNamePrefix
- Parameters:
workerNamePrefix- prefix to be used for worker names, defaults to workflow-worker- if not supplied.- Returns:
- Returns the current instance.
-
withSleepWhenRetry
- Parameters:
sleepWhenRetry- time in milliseconds, for which the thread should sleep when task update call fails, before retrying the operation.- Returns:
- Returns the current instance.
-
withUpdateRetryCount
- Parameters:
updateRetryCount- number of times to retry the failed updateTask operation- Returns:
- Builder instance
- See Also:
-
withConductorClientConfiguration
public TaskRunnerConfigurer.Builder withConductorClientConfiguration(ConductorClientConfiguration conductorClientConfiguration) - Parameters:
conductorClientConfiguration- client configuration to handle external payloads- Returns:
- Builder instance
-
withShutdownGracePeriodSeconds
- Parameters:
shutdownGracePeriodSeconds- waiting seconds before forcing shutdown of your worker- Returns:
- Builder instance
-
withTaskToDomain
-
withTaskThreadCount
-
withTaskToThreadCount
-
withTaskPollTimeout
-
withTaskPollTimeout
-
withTaskPollCount
-
withTaskPollCount
-
build
Builds an instance of the TaskRunnerConfigurer.Please see
TaskRunnerConfigurer.init()method. The method must be called after this constructor for the polling to start.- Returns:
- Builder instance
-
withThreadCount
- Parameters:
threadCount- # of threads assigned to the workers. Should be at-least the size of taskWorkers to avoid starvation in a busy system.- Returns:
- Builder instance
-
withPollFilter
-
withListener
public <T extends TaskRunnerEvent> TaskRunnerConfigurer.Builder withListener(Class<T> eventType, Consumer<T> listener) -
withMetricsCollector
-