Class WorkerFactoryOptions.Builder

  • Enclosing class:
    WorkerFactoryOptions

    public static class WorkerFactoryOptions.Builder
    extends java.lang.Object
    • Method Detail

      • setDisableStickyExecution

        public WorkerFactoryOptions.Builder setDisableStickyExecution​(boolean disableStickyExecution)
        When set to false it will create an affinity between the worker and the workflow run it's processing. Workers will cache workflows and will handle all decisions for that workflow instance until it's complete or evicted from the cache. Default value is false.
      • setStickyCacheSize

        public WorkerFactoryOptions.Builder setStickyCacheSize​(int stickyCacheSize)
        When Sticky execution is enabled this will set the maximum allowed number of workflows cached. This cache is shared by all workers created by the Factory.

        Default value is 600.

      • setMaxWorkflowThreadCount

        public WorkerFactoryOptions.Builder setMaxWorkflowThreadCount​(int maxWorkflowThreadCount)
        Maximum number of threads available for workflow execution across all workers created by the Factory.

        Default value is 600.

      • setStickyTaskScheduleToStartTimeout

        public WorkerFactoryOptions.Builder setStickyTaskScheduleToStartTimeout​(java.time.Duration stickyTaskScheduleToStartTimeout)
        Timeout for sticky workflow decision to be picked up by the host assigned to it. Once it times out then it can be picked up by any worker. Default value is 5 seconds.
      • setStickyPollerCount

        public WorkerFactoryOptions.Builder setStickyPollerCount​(int stickyPollerCount)
        PollerOptions for poller responsible for polling for decisions for workflows cached by all workers created by this factory.