Package one.nio.async
Class AsyncExecutor
- java.lang.Object
-
- one.nio.async.AsyncExecutor
-
public class AsyncExecutor extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static ThreadPoolExecutorPOOL
-
Constructor Summary
Constructors Constructor Description AsyncExecutor()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidfork(int workers, ParallelTask task)static voidfork(ParallelTask task)static <T> Future<T>submit(Callable<T> task)static <T> CombinedFuture<T>submitAll(Callable<T>... tasks)
-
-
-
Field Detail
-
POOL
public static final ThreadPoolExecutor POOL
-
-
Method Detail
-
submitAll
public static <T> CombinedFuture<T> submitAll(Callable<T>... tasks)
-
fork
public static void fork(ParallelTask task) throws AsyncException
- Throws:
AsyncException
-
fork
public static void fork(int workers, ParallelTask task) throws AsyncException- Throws:
AsyncException
-
-