Class ConcurrencyConfiguration

  • All Implemented Interfaces:
    Configurable

    public class ConcurrencyConfiguration
    extends Object
    implements Configurable
    The ConcurrencyConfiguration class is used to store the concurrency settings of the framework.
    Author:
    Vasilis Vryniotis
    • Field Detail

      • AVAILABLE_PROCESSORS

        public static final int AVAILABLE_PROCESSORS
        The total number of processors.
    • Constructor Detail

      • ConcurrencyConfiguration

        public ConcurrencyConfiguration()
        Protected constructor.
    • Method Detail

      • isParallelized

        public boolean isParallelized()
        Getter for the parallelized flag.
        Returns:
      • setParallelized

        public void setParallelized​(boolean parallelized)
        Setter for the parallelized flag. This option controls whether parallel execution of threads is allowed in the framework.
        Parameters:
        parallelized -
      • getMaxNumberOfThreadsPerTask

        public Integer getMaxNumberOfThreadsPerTask()
        Returns the maximum number of threads which can be used for a specific task by the framework.
        Returns:
      • setMaxNumberOfThreadsPerTask

        public void setMaxNumberOfThreadsPerTask​(Integer maxNumberOfThreadsPerTask)
        Setter for the maximum number of threads which can be used for a specific task by the framework. By convention if the value is 0, the max number of threads is set equal to the available processors.
        Parameters:
        maxNumberOfThreadsPerTask -
      • load

        public void load​(Properties properties)
        Initializes the Configuration object by using a property file.
        Specified by:
        load in interface Configurable