Package one.nio.async
Class AsyncExecutor
- java.lang.Object
-
- one.nio.async.AsyncExecutor
-
public class AsyncExecutor extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static java.util.concurrent.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> java.util.concurrent.Future<T>submit(java.util.concurrent.Callable<T> task)static <T> CombinedFuture<T>submitAll(java.util.concurrent.Callable<T>... tasks)
-
-
-
Method Detail
-
submit
public static <T> java.util.concurrent.Future<T> submit(java.util.concurrent.Callable<T> task)
-
submitAll
public static <T> CombinedFuture<T> submitAll(java.util.concurrent.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
-
-