@Test public void testCallCallables() throws InterruptedException, ExecutionException { BoolCallable callable1 = new BoolCallable(); BoolCallable callable2 = new BoolCallable(); Collection<? extends Callable<Boolean>> callables = Arrays.asList( callable1, callable2 ); List<Future<Boolean>> futures = Utils.callCallables( callables ); for ( Future<Boolean> future : futures ) { assertTrue( future.get() ); } }
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 );  }