code: public void setMaxNumberOfThreadsPerTask(Integer maxNumberOfThreadsPerTask) {
          if(maxNumberOfThreadsPerTask<0) {
              throw new IllegalArgumentException("The max number of threads can not be negative.");
          }
          else if(maxNumberOfThreadsPerTask==0) {
              this.maxNumberOfThreadsPerTask = AVAILABLE_PROCESSORS;
          }
          else {
              this.maxNumberOfThreadsPerTask = Math.min(maxNumberOfThreadsPerTask, 4*AVAILABLE_PROCESSORS);
          }
      }
docs: 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.
  
  @param maxNumberOfThreadsPerTask