@Test public void testInterruptManagedThreads() throws Exception { Thread t = ManagedThreadFactory.createThread(new StayingAlive()); ManagedThreadFactory.createThread(new Runnable() { @Override public void run() { } }).start(); t.start(); ManagedThreadFactory.interruptManagedThreads(); t.join(); }
public static void interruptManagedThreads() { logger.trace("Interrupt Request Received"); for (Thread t : CREATED_THREADS) { if (t.isAlive() && !t.isInterrupted()) { t.interrupt(); } } }
ManagedThreadFactory implements ThreadFactory { public static void interruptManagedThreads() { logger.trace("Interrupt Request Received"); for (Thread t : CREATED_THREADS) { if (t.isAlive() && !t.isInterrupted()) { t.interrupt(); } } } }
ManagedThreadFactory implements ThreadFactory { public static void interruptManagedThreads() { logger.trace("Interrupt Request Received"); for (Thread t : CREATED_THREADS) { if (t.isAlive() && !t.isInterrupted()) { t.interrupt(); } } } ManagedThreadFactory();  ManagedThreadFactory(String prefix); }
ManagedThreadFactory implements ThreadFactory { public static void interruptManagedThreads() { logger.trace("Interrupt Request Received"); for (Thread t : CREATED_THREADS) { if (t.isAlive() && !t.isInterrupted()) { t.interrupt(); } } } 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 void interruptManagedThreads() { logger.trace("Interrupt Request Received"); for (Thread t : CREATED_THREADS) { if (t.isAlive() && !t.isInterrupted()) { t.interrupt(); } } } 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);  }