@Test( expected = MDRuntimeException.class ) public void testCallCallablesInterrupted() { Callable<Void> runningCallable = new SleepingRunnable( -1 ); Callable<Void> interruptCallable = new InterruptingRunnable( Thread.currentThread() ); Collection<? extends Callable<Void>> callables = Arrays.asList( runningCallable, interruptCallable ); Utils.callCallables( callables ); fail( "should not get here" ); }
public static <T> List<Future<T>> callCallables( final Collection<? extends Callable<T>> callables ) { try { return THREAD_POOL.invokeAll( callables ); } catch ( final InterruptedException ex ) { throw new MDRuntimeException( ex ); } }
Utils { public static <T> List<Future<T>> callCallables( final Collection<? extends Callable<T>> callables ) { try { return THREAD_POOL.invokeAll( callables ); } catch ( final InterruptedException ex ) { throw new MDRuntimeException( ex ); } } }
Utils { public static <T> List<Future<T>> callCallables( final Collection<? extends Callable<T>> callables ) { try { return THREAD_POOL.invokeAll( callables ); } catch ( final InterruptedException ex ) { throw new MDRuntimeException( ex ); } } private  Utils(); }
Utils { public static <T> List<Future<T>> callCallables( final Collection<? extends Callable<T>> callables ) { try { return THREAD_POOL.invokeAll( callables ); } catch ( final InterruptedException ex ) { throw new MDRuntimeException( ex ); } } private  Utils(); static List<Future<T>> callCallables( final Collection<? extends Callable<T>> callables ); static Future<T> callCallable( final Callable<T> callable ); static Future<?> callCallable( final Runnable runnable ); static PropertiesBuilder newPropertiesBuilder(); static PropertiesBuilder newPropertiesBuilder( final Properties defaults ); static void registerMBean( final Object mbean, final String domain, final String... params ); static void registerMBean( final Object mbean, final String domain, final String paramString ); static void registerMBean( final Object mbean, final String name ); static void registerMBean( final Object mbean, final ObjectName name ); }
Utils { public static <T> List<Future<T>> callCallables( final Collection<? extends Callable<T>> callables ) { try { return THREAD_POOL.invokeAll( callables ); } catch ( final InterruptedException ex ) { throw new MDRuntimeException( ex ); } } private  Utils(); static List<Future<T>> callCallables( final Collection<? extends Callable<T>> callables ); static Future<T> callCallable( final Callable<T> callable ); static Future<?> callCallable( final Runnable runnable ); static PropertiesBuilder newPropertiesBuilder(); static PropertiesBuilder newPropertiesBuilder( final Properties defaults ); static void registerMBean( final Object mbean, final String domain, final String... params ); static void registerMBean( final Object mbean, final String domain, final String paramString ); static void registerMBean( final Object mbean, final String name ); static void registerMBean( final Object mbean, final ObjectName name );  }