@Test(expected = RejectedExecutionException.class) public void testShutdownQuietlyExecutors_Slow() throws Exception { ExecutorService executor = Executors.newCachedThreadPool(new ManagedThreadFactory()); executor.submit(new StayingAlive()); 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);  }