Class AnalysisTaskConfigBuilder


  • @Generated({"common/config/src/templates/ConfigBuilder.stg","common/config/config.gradle"})
    public final class AnalysisTaskConfigBuilder
    extends java.lang.Object
    Builder for AnalysisTaskConfig.
    • Constructor Detail

      • AnalysisTaskConfigBuilder

        public AnalysisTaskConfigBuilder()
        Constructs an empty AnalysisTaskConfigBuilder
      • AnalysisTaskConfigBuilder

        public AnalysisTaskConfigBuilder​(java.util.Map<AnalysisTaskConfig.Field,​java.lang.Object> values)
        Constructs a AnalysisTaskConfigBuilder initialized with the values from the given map
        Parameters:
        values - a map containing configuration values
      • AnalysisTaskConfigBuilder

        public AnalysisTaskConfigBuilder​(AnalysisTaskConfig config)
        Constructs a AnalysisTaskConfigBuilder initialized with the values from the given config
        Parameters:
        config - the configuration to take the values from
      • AnalysisTaskConfigBuilder

        public AnalysisTaskConfigBuilder​(AnalysisTaskConfigBuilder builder)
        Constructs a AnalysisTaskConfigBuilder initialized with the values from the given builder
        Parameters:
        builder - the builder to take the values from
    • Method Detail

      • build

        public AnalysisTaskConfig build​(java.lang.String parentPath)
        Builds the AnalysisTaskConfig.
        Parameters:
        parentPath - if not null, resolves relative paths against this parentPath
        Returns:
        an instance of AnalysisTaskConfig
      • build

        public AnalysisTaskConfig build()
        Builds the AnalysisTaskConfig with a parentPath of null.
        Returns:
        An instance of AnalysisTaskConfig
        See Also:
        build(String)
      • toInputStream

        public java.io.InputStream toInputStream()
        Returns:
        an InputStream representing the config
      • getValues

        public java.util.Map<AnalysisTaskConfig.Field,​java.lang.Object> getValues()
        Returns:
        the raw config values
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • setWeight

        public AnalysisTaskConfigBuilder setWeight​(int weight)
        the weight of the task. Threads are given to tasks proportionally to their weight. Tasks with higher weight will get more threads than tasks with lower weight. Tasks with the same weight will get the same amount of threads.
      • setPriority

        public AnalysisTaskConfigBuilder setPriority​(TaskPriority priority)
        the priority of the task. Threads are given to the task with the highest priority at the moment of execution. If there are more threads that have the highest priority, threads are given to the tasks according to their weight
      • setMaxThreads

        public AnalysisTaskConfigBuilder setMaxThreads​(int maxThreads)
        a hard limit on the number of threads to use for a task.