code: public void setProcessorMaxThreads(int maxThreads) {
          if (processor.getCorePoolSize() > maxThreads) {
              processor.setCorePoolSize(maxThreads);
          }
          processor.setMaximumPoolSize(maxThreads);
      }
docs: Set the max threads for the processors
  @param maxThreads - max threads that can be launched for processing