@Test(expected = RejectedExecutionException.class) public void testShutdownQuietlyExecutors_Quick() throws Exception { ManagedThreadFactory.shutdownQuietly(null, new TimeInterval(1L, TimeUnit.SECONDS)); ExecutorService executor = Executors.newCachedThreadPool(new ManagedThreadFactory()); executor.submit(new Runnable() { @Override public void run() {} }); ManagedThreadFactory.shutdownQuietly(executor, new TimeInterval(1L, TimeUnit.SECONDS)); executor.submit(new Runnable() { @Override public void run() {} }); }
public static List<Runnable> shutdownQuietly(ExecutorService executor, TimeInterval timeout) { return shutdownQuietly(executor, timeout.toMilliseconds()); }
ManagedThreadFactory implements ThreadFactory { public static List<Runnable> shutdownQuietly(ExecutorService executor, TimeInterval timeout) { return shutdownQuietly(executor, timeout.toMilliseconds()); } }
ManagedThreadFactory implements ThreadFactory { public static List<Runnable> shutdownQuietly(ExecutorService executor, TimeInterval timeout) { return shutdownQuietly(executor, timeout.toMilliseconds()); } ManagedThreadFactory();  ManagedThreadFactory(String prefix); }
ManagedThreadFactory implements ThreadFactory { public static List<Runnable> shutdownQuietly(ExecutorService executor, TimeInterval timeout) { return shutdownQuietly(executor, timeout.toMilliseconds()); } ManagedThreadFactory();  ManagedThreadFactory(String prefix); static Thread createThread(Runnable r); static Thread createThread(String name, Runnable r); @Override Thread newThread(Runnable runner); static void interruptManagedThreads(); static List<Runnable> shutdownQuietly(ExecutorService executor, TimeInterval timeout); static List<Runnable> shutdownQuietly(ExecutorService executor, long timeoutMs); }
ManagedThreadFactory implements ThreadFactory { public static List<Runnable> shutdownQuietly(ExecutorService executor, TimeInterval timeout) { return shutdownQuietly(executor, timeout.toMilliseconds()); } ManagedThreadFactory();  ManagedThreadFactory(String prefix); static Thread createThread(Runnable r); static Thread createThread(String name, Runnable r); @Override Thread newThread(Runnable runner); static void interruptManagedThreads(); static List<Runnable> shutdownQuietly(ExecutorService executor, TimeInterval timeout); static List<Runnable> shutdownQuietly(ExecutorService executor, long timeoutMs);  }