public class MultithreadExecutors extends Object
| 构造器和说明 |
|---|
MultithreadExecutors() |
| 限定符和类型 | 方法和说明 |
|---|---|
static <T,U> List<U> |
call(Collection<T> coll,
Function<T,U> mapper,
Executor executor) |
static <T,U> List<U> |
call(Collection<T> coll,
Function<T,U> mapper,
Executor executor,
int dataSizeThreshold)
Convert collection element data
|
static <T> void |
run(Collection<T> coll,
Consumer<T> action,
Executor executor) |
static <T> void |
run(Collection<T> coll,
Consumer<T> action,
Executor executor,
int dataSizeThreshold)
Run async, action the T collection
|
public static <T> void run(Collection<T> coll, Consumer<T> action, Executor executor)
public static <T> void run(Collection<T> coll, Consumer<T> action, Executor executor, int dataSizeThreshold)
T - the collection element typecoll - the collectionaction - the actionexecutor - the executordataSizeThreshold - the dataSizeThresholdpublic static <T,U> List<U> call(Collection<T> coll, Function<T,U> mapper, Executor executor)
public static <T,U> List<U> call(Collection<T> coll, Function<T,U> mapper, Executor executor, int dataSizeThreshold)
T - the source collection element typeU - the target collection element typecoll - the collectionmapper - the mapperexecutor - the executordataSizeThreshold - the executorCopyright © 2025. All rights reserved.