Class TaskProperties.Builder

    • Method Detail

      • withState

        public TaskProperties.Builder withState​(String state)
        Sets the task state used to build task properties.
        Parameters:
        state - task state
        Returns:
        this builder
      • withWarehouse

        public TaskProperties.Builder withWarehouse​(Reference warehouseReference)
        Sets the warehouse reference used to build task properties.
        Parameters:
        warehouseReference - warehouse reference
        Returns:
        this builder
      • withWarehouse

        public TaskProperties.Builder withWarehouse​(Identifier warehouseIdentifier)
        Sets the warehouse identifier used to build task properties.
        Parameters:
        warehouseIdentifier - warehouse identifier
        Returns:
        this builder
      • withWarehouse

        public TaskProperties.Builder withWarehouse​(String warehouse)
        Sets the warehouse used to build task properties.

        The provided String can be a warehouse identifier or a reference. If a warehouse identifier is provided - a new identifier instance is created without any auto quoting.

        Parameters:
        warehouse - warehouse identifier or reference
        Returns:
        this builder
      • withWarehouse

        public TaskProperties.Builder withWarehouse​(String warehouse,
                                                    Identifier.AutoQuoting autoQuoting)
        Sets the warehouse used to build task properties.
        Parameters:
        warehouse - warehouse identifier or reference
        autoQuoting - whether warehouse identifier auto quoting should be used
        Returns:
        this builder
      • withCondition

        public TaskProperties.Builder withCondition​(String condition)
        Sets the task condition used to build task properties.
        Parameters:
        condition - task condition
        Returns:
        this builder
      • withAllowOverlappingExecution

        public TaskProperties.Builder withAllowOverlappingExecution​(boolean allowOverlappingExecution)
        Sets the task overlapping execution allowance used to build task properties.
        Parameters:
        allowOverlappingExecution - overlapping execution allowance
        Returns:
        this builder
      • withSuspendTaskAfterNumFailures

        public TaskProperties.Builder withSuspendTaskAfterNumFailures​(int failuresNumberToSuspension)
        Sets the number of task failures before suspension used to build task properties.
        Parameters:
        failuresNumberToSuspension - number of task failures before suspension
        Returns:
        this builder
      • withUserTaskTimeoutMs

        public TaskProperties.Builder withUserTaskTimeoutMs​(long userTaskTimeoutMs)
        Specifies the time limit on a single run of the task before it times out (in milliseconds).
        Parameters:
        userTaskTimeoutMs - time limit on a single run of the task before it times out
        Returns:
        this builder
      • withSchedule

        public TaskProperties.Builder withSchedule​(String schedule)
        Sets the task schedule used to build task properties.
        Parameters:
        schedule - task schedule
        Returns:
        this builder
      • withPredecessors

        public TaskProperties.Builder withPredecessors​(List<TaskRef> predecessors)
        Sets the task predecessors used to build task properties.

        Task predecessors are tasks, which were listed in the AFTER parameter during task creation.

        Parameters:
        predecessors - task predecessors
        Returns:
        this builder
      • build

        public TaskProperties build()
        Build new task properties.
        Returns:
        new task properties