public class ParallelForEach extends Object
Modifier and Type | Class and Description |
---|---|
static class |
ParallelForEach.BoundedExecutor
From
|
Modifier and Type | Field and Description |
---|---|
static org.slf4j.Logger |
LOG |
Constructor and Description |
---|
ParallelForEach() |
Modifier and Type | Method and Description |
---|---|
static <T> void |
iterate(Iterator<T> iterator,
int numThreads,
int queueSize,
Procedure<T> fn,
int logModulo) |
static <T> void |
iterate(Iterator<T> iterator,
Procedure<T> fn) |
static <T> void |
iterate(Iterator<T> iterator,
Procedure<T> fn,
int logModulo) |
static <T,R> List<R> |
loop(Collection<T> collection,
Function<T,R> fn) |
static <T,R> List<R> |
loop(Collection<T> collection,
Function<T,R> fn,
int logModulo) |
static <T,R> List<R> |
loop(Collection<T> collection,
int numThreads,
Function<T,R> fn) |
static <T,R> List<R> |
loop(Collection<T> collection,
int numThreads,
Function<T,R> fn,
int logModulo) |
static <T> void |
loop(Collection<T> collection,
int numThreads,
Procedure<T> fn) |
static <T> void |
loop(Collection<T> collection,
int numThreads,
Procedure<T> fn,
int logModulo) |
static <T> void |
loop(Collection<T> collection,
Procedure<T> fn) |
static <T> void |
loop(Collection<T> collection,
Procedure<T> fn,
int logModulo) |
static <T,R> List<R> |
range(int from,
int to,
Function<Integer,R> fn) |
static <T,R> List<R> |
range(int from,
int to,
int numThreads,
Function<Integer,R> fn) |
static void |
range(int from,
int to,
int numThreads,
Procedure<Integer> fn)
Construct a parallel loop on [from, to).
|
static void |
range(int from,
int to,
Procedure<Integer> fn) |
public static void range(int from, int to, int numThreads, Procedure<Integer> fn)
from
- bottom of range (inclusive)to
- top of range (exclusive)numThreads
- fn
- callbackpublic static <T,R> List<R> loop(Collection<T> collection, int numThreads, Function<T,R> fn)
public static <T,R> List<R> loop(Collection<T> collection, Function<T,R> fn)
public static <T> void loop(Collection<T> collection, Procedure<T> fn)
public static <T> void loop(Collection<T> collection, int numThreads, Procedure<T> fn)
public static <T> void loop(Collection<T> collection, int numThreads, Procedure<T> fn, int logModulo)
public static <T> void loop(Collection<T> collection, Procedure<T> fn, int logModulo)
public static <T,R> List<R> loop(Collection<T> collection, Function<T,R> fn, int logModulo)
public static <T,R> List<R> loop(Collection<T> collection, int numThreads, Function<T,R> fn, int logModulo)
Copyright © 2018. All rights reserved.