@Test public void newFixedThreadPool() throws Exception { ThreadPoolExecutor executor = ThreadPoolUtils.newFixedThreadPool(10); Assert.assertEquals(executor.getCorePoolSize(), 10); Assert.assertEquals(executor.getMaximumPoolSize(), 10); }
public static ThreadPoolExecutor newFixedThreadPool(int corePoolSize) { return new ThreadPoolExecutor(corePoolSize, corePoolSize, 0, TimeUnit.MILLISECONDS, new SynchronousQueue<Runnable>()); }
ThreadPoolUtils { public static ThreadPoolExecutor newFixedThreadPool(int corePoolSize) { return new ThreadPoolExecutor(corePoolSize, corePoolSize, 0, TimeUnit.MILLISECONDS, new SynchronousQueue<Runnable>()); } }
ThreadPoolUtils { public static ThreadPoolExecutor newFixedThreadPool(int corePoolSize) { return new ThreadPoolExecutor(corePoolSize, corePoolSize, 0, TimeUnit.MILLISECONDS, new SynchronousQueue<Runnable>()); }  }
ThreadPoolUtils { public static ThreadPoolExecutor newFixedThreadPool(int corePoolSize) { return new ThreadPoolExecutor(corePoolSize, corePoolSize, 0, TimeUnit.MILLISECONDS, new SynchronousQueue<Runnable>()); }  static ThreadPoolExecutor newFixedThreadPool(int corePoolSize); static ThreadPoolExecutor newFixedThreadPool(int corePoolSize,
                                                        BlockingQueue<Runnable> queue); static ThreadPoolExecutor newFixedThreadPool(int corePoolSize,
                                                        BlockingQueue<Runnable> queue,
                                                        ThreadFactory threadFactory); static ThreadPoolExecutor newFixedThreadPool(int corePoolSize,
                                                        BlockingQueue<Runnable> queue,
                                                        ThreadFactory threadFactory,
                                                        RejectedExecutionHandler handler); static ThreadPoolExecutor newCachedThreadPool(int corePoolSize,
                                                         int maximumPoolSize); static ThreadPoolExecutor newCachedThreadPool(int corePoolSize,
                                                         int maximumPoolSize,
                                                         BlockingQueue<Runnable> queue); static ThreadPoolExecutor newCachedThreadPool(int corePoolSize,
                                                         int maximumPoolSize,
                                                         BlockingQueue<Runnable> queue,
                                                         ThreadFactory threadFactory); static ThreadPoolExecutor newCachedThreadPool(int corePoolSize,
                                                         int maximumPoolSize,
                                                         BlockingQueue<Runnable> queue,
                                                         ThreadFactory threadFactory,
                                                         RejectedExecutionHandler handler); static ThreadPoolExecutor newCachedThreadPool(int corePoolSize,
                                                         int maximumPoolSize,
                                                         int keepAliveTime,
                                                         BlockingQueue<Runnable> queue,
                                                         ThreadFactory threadFactory,
                                                         RejectedExecutionHandler handler); static BlockingQueue<Runnable> buildQueue(int size); static BlockingQueue<Runnable> buildQueue(int size, boolean isPriority); }
ThreadPoolUtils { public static ThreadPoolExecutor newFixedThreadPool(int corePoolSize) { return new ThreadPoolExecutor(corePoolSize, corePoolSize, 0, TimeUnit.MILLISECONDS, new SynchronousQueue<Runnable>()); }  static ThreadPoolExecutor newFixedThreadPool(int corePoolSize); static ThreadPoolExecutor newFixedThreadPool(int corePoolSize,
                                                        BlockingQueue<Runnable> queue); static ThreadPoolExecutor newFixedThreadPool(int corePoolSize,
                                                        BlockingQueue<Runnable> queue,
                                                        ThreadFactory threadFactory); static ThreadPoolExecutor newFixedThreadPool(int corePoolSize,
                                                        BlockingQueue<Runnable> queue,
                                                        ThreadFactory threadFactory,
                                                        RejectedExecutionHandler handler); static ThreadPoolExecutor newCachedThreadPool(int corePoolSize,
                                                         int maximumPoolSize); static ThreadPoolExecutor newCachedThreadPool(int corePoolSize,
                                                         int maximumPoolSize,
                                                         BlockingQueue<Runnable> queue); static ThreadPoolExecutor newCachedThreadPool(int corePoolSize,
                                                         int maximumPoolSize,
                                                         BlockingQueue<Runnable> queue,
                                                         ThreadFactory threadFactory); static ThreadPoolExecutor newCachedThreadPool(int corePoolSize,
                                                         int maximumPoolSize,
                                                         BlockingQueue<Runnable> queue,
                                                         ThreadFactory threadFactory,
                                                         RejectedExecutionHandler handler); static ThreadPoolExecutor newCachedThreadPool(int corePoolSize,
                                                         int maximumPoolSize,
                                                         int keepAliveTime,
                                                         BlockingQueue<Runnable> queue,
                                                         ThreadFactory threadFactory,
                                                         RejectedExecutionHandler handler); static BlockingQueue<Runnable> buildQueue(int size); static BlockingQueue<Runnable> buildQueue(int size, boolean isPriority); static int THREAD_PRIORITY_NORMAL; static int THREAD_PRIORITY_HIGH; static int THREAD_PRIORITY_LOW; }