package org.opendaylight.yangtools.util.concurrent;
import java.util.concurrent.ExecutorService;
-import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
/**
FastThreadPoolExecutor executor =
new FastThreadPoolExecutor( maximumPoolSize, maximumQueueSize, threadPrefix );
- executor.setRejectedExecutionHandler( new ThreadPoolExecutor.CallerRunsPolicy() );
+ executor.setRejectedExecutionHandler( CountingRejectedExecutionHandler.newCallerRunsPolicy() );
return executor;
}
CachedThreadPoolExecutor executor =
new CachedThreadPoolExecutor( maximumPoolSize, maximumQueueSize, threadPrefix );
- executor.setRejectedExecutionHandler( new ThreadPoolExecutor.CallerRunsPolicy() );
+ executor.setRejectedExecutionHandler( CountingRejectedExecutionHandler.newCallerRunsPolicy() );
return executor;
}