Example #1
0
  @Modified
  public void modified(Map<String, ?> properties) {
    final Configuration conf = Configuration.create(properties);
    m_conf = conf;

    final int numberOfThreads = conf.numberOfThreads();
    if (m_executor.getCorePoolSize() != numberOfThreads) {
      m_executor.setCorePoolSize(numberOfThreads);
      c_logger.info("Scheduler modified: numberOfThreads={}", numberOfThreads);
    }
  }
 @Override
 public void setThreadPoolSize(int size) {
   threadPoolSize = size;
   stfe.setCorePoolSize(threadPoolSize);
 }