Package ru.bitel.common.concurrent
Class ConcurrentUtils
java.lang.Object
ru.bitel.common.concurrent.ConcurrentUtils
public class ConcurrentUtils
extends java.lang.Object
-
Constructor Summary
Constructors Constructor Description ConcurrentUtils()
-
Method Summary
Modifier and Type Method Description static boolean
awaitFutures(java.util.List<? extends java.util.concurrent.Future<?>> futures)
static boolean
awaitFutures(java.util.List<? extends java.util.concurrent.Future<?>> futures, long timeout, java.util.concurrent.TimeUnit unit)
static boolean
invokeAll(java.util.List<? extends java.lang.Runnable> tasks, int threadCount)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
ConcurrentUtils
public ConcurrentUtils()
-
-
Method Details
-
awaitFutures
public static boolean awaitFutures(java.util.List<? extends java.util.concurrent.Future<?>> futures, long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException- Throws:
java.lang.InterruptedException
-
awaitFutures
public static boolean awaitFutures(java.util.List<? extends java.util.concurrent.Future<?>> futures) throws java.lang.InterruptedException- Throws:
java.lang.InterruptedException
-
invokeAll
public static boolean invokeAll(java.util.List<? extends java.lang.Runnable> tasks, int threadCount) throws java.lang.InterruptedException- Throws:
java.lang.InterruptedException
-