Class ConcurrentUtils

java.lang.Object
com.aoapps.concurrent.ConcurrentUtils

public final class ConcurrentUtils extends Object
Concurrency utilities.
  • Method Summary

    Modifier and Type
    Method
    Description
    static <E> List<E>
    getAll(Iterable<? extends Future<? extends E>> futures)
    Gets all of the results of the futures, returning a modifiable list of the results.
    static <E, C extends Collection<E>>
    C
    getAll(Iterable<? extends Future<? extends E>> futures, C output)
    Gets all of the results of the futures into the provided collection.
    static <K, V> Map<K,V>
    getAll(Map<? extends K,? extends Future<? extends V>> futures)
    Gets all of the results of the futures, returning a modifiable map of the results.
    static <K, V, M extends Map<K, V>>
    M
    getAll(Map<? extends K,? extends Future<? extends V>> futures, M output)
    Gets all of the results of the futures into the provided map.
    static void
    waitForAll(Iterable<? extends Future<?>> futures)
    Waits for all futures to complete, discarding any results.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait