Package fj.impl
Class AbstractForkJoin
java.lang.Object
fj.impl.AbstractForkJoin
- All Implemented Interfaces:
ForkJoin
- Direct Known Subclasses:
ExecutorForkJoin
,ImpartialForkJoin
,LinearForkJoin
- Author:
- Dennis Cosgrove
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription<R> Future<R>[]
fork_loop
(int min, int maxExclusive, TaskIntFunction<R> intFunction) fork_loop
(Iterable<T> iterable, TaskFunction<T, R> function) <T,
R> Future<R>[] fork_loop
(T[] array, TaskFunction<T, R> function) fork_loop_with_index
(Iterable<T> iterable, TaskFunctionWithIndex<T, R> functionWithIndex) <T,
R> Future<R>[] fork_loop_with_index
(T[] array, TaskFunctionWithIndex<T, R> functionWithIndex) invokeAllAndGetAll
(Collection<? extends Callable<T>> tasks) <R> List<R>
join
(Collection<Future<R>> futures) <R> R
<R> List<R>
<R> List<R>
<R> R[]
join
(IntFunction<R[]> returnValueArrayCreator, Future<R>[] futures) <R> R[]
join
(IntFunction<R[]> returnValueArrayCreator, Future<R> a, Future<R> b, Future<R>... cToZ) <R> List<R>
join_fork_loop
(int min, int maxExclusive, TaskIntFunction<R> intFunction) <T,
R> List<R> join_fork_loop
(Iterable<T> iterable, TaskFunction<T, R> function) <R> R[]
join_fork_loop
(IntFunction<R[]> returnValueArrayCreator, int min, int maxExclusive, TaskIntFunction<R> function) <T,
R> R[] join_fork_loop
(IntFunction<R[]> returnValueArrayCreator, T[] array, TaskFunction<T, R> function) <T,
R> List<R> join_fork_loop
(T[] array, TaskFunction<T, R> function) <T,
R> List<R> join_fork_loop_with_index
(Iterable<T> iterable, TaskFunctionWithIndex<T, R> functionWithIndex) <T,
R> R[] join_fork_loop_with_index
(IntFunction<R[]> returnValueArrayCreator, T[] array, TaskFunctionWithIndex<T, R> functionWithIndex) <T,
R> List<R> join_fork_loop_with_index
(T[] array, TaskFunctionWithIndex<T, R> functionWithIndex) void
join_void_fork_loop
(int min, int maxExclusive, TaskIntConsumer consumer) <T> void
join_void_fork_loop
(Iterable<T> iterable, TaskConsumer<T> consumer) <T> void
join_void_fork_loop
(T[] array, TaskConsumer<T> consumer) void
join_void_fork_loop_2d
(int aMin, int aMaxExclusive, int bMin, int bMaxExclusive, TaskBiIntConsumer biConsumer) void
join_void_fork_loop_2d_auto_coarsen
(int aMin, int aMaxExclusive, int bMin, int bMaxExclusive, TaskBiIntConsumer biConsumer) void
join_void_fork_loop_auto_coarsen
(int min, int maxExclusive, TaskIntConsumer consumer) <T> void
join_void_fork_loop_with_index
(Iterable<T> iterable, TaskConsumerWithIndex<T> consumerWithIndex) <T> void
join_void_fork_loop_with_index
(T[] array, TaskConsumerWithIndex<T> consumerWithIndex) void_fork
(TaskRunnable runnable) void_fork_loop
(int min, int maxExclusive, TaskIntConsumer intConsumer) void_fork_loop
(Iterable<T> iterable, TaskConsumer<T> consumer) void_fork_loop
(T[] array, TaskConsumer<T> consumer) void_fork_loop_with_index
(Iterable<T> iterable, TaskConsumerWithIndex<T> consumerWithIndex) void_fork_loop_with_index
(T[] array, TaskConsumerWithIndex<T> consumerWithIndex)
-
Constructor Details
-
AbstractForkJoin
public AbstractForkJoin()
-
-
Method Details
-
invokeAllAndGetAll
protected abstract <T> List<Future<T>> invokeAllAndGetAll(Collection<? extends Callable<T>> tasks) throws InterruptedException, ExecutionException -
void_fork
-
join
- Specified by:
join
in interfaceForkJoin
- Throws:
InterruptedException
ExecutionException
-
join
public <R> List<R> join(Collection<Future<R>> futures) throws InterruptedException, ExecutionException - Specified by:
join
in interfaceForkJoin
- Throws:
InterruptedException
ExecutionException
-
join
- Specified by:
join
in interfaceForkJoin
- Throws:
InterruptedException
ExecutionException
-
join
public <R> R[] join(IntFunction<R[]> returnValueArrayCreator, Future<R>[] futures) throws InterruptedException, ExecutionException - Specified by:
join
in interfaceForkJoin
- Throws:
InterruptedException
ExecutionException
-
join
public <R> List<R> join(Future<R> a, Future<R> b, Future<R>... cToZ) throws InterruptedException, ExecutionException - Specified by:
join
in interfaceForkJoin
- Throws:
InterruptedException
ExecutionException
-
join
public <R> R[] join(IntFunction<R[]> returnValueArrayCreator, Future<R> a, Future<R> b, Future<R>... cToZ) throws InterruptedException, ExecutionException - Specified by:
join
in interfaceForkJoin
- Throws:
InterruptedException
ExecutionException
-
fork_loop
-
fork_loop
-
fork_loop
-
fork_loop_with_index
public <T,R> List<Future<R>> fork_loop_with_index(Iterable<T> iterable, TaskFunctionWithIndex<T, R> functionWithIndex) - Specified by:
fork_loop_with_index
in interfaceForkJoin
-
fork_loop_with_index
public <T,R> Future<R>[] fork_loop_with_index(T[] array, TaskFunctionWithIndex<T, R> functionWithIndex) - Specified by:
fork_loop_with_index
in interfaceForkJoin
-
void_fork_loop
- Specified by:
void_fork_loop
in interfaceForkJoin
-
void_fork_loop
- Specified by:
void_fork_loop
in interfaceForkJoin
-
void_fork_loop
- Specified by:
void_fork_loop
in interfaceForkJoin
-
void_fork_loop_with_index
public <T> List<Future<Void>> void_fork_loop_with_index(Iterable<T> iterable, TaskConsumerWithIndex<T> consumerWithIndex) - Specified by:
void_fork_loop_with_index
in interfaceForkJoin
-
void_fork_loop_with_index
public <T> Future<Void>[] void_fork_loop_with_index(T[] array, TaskConsumerWithIndex<T> consumerWithIndex) - Specified by:
void_fork_loop_with_index
in interfaceForkJoin
-
join_fork_loop
public <R> List<R> join_fork_loop(int min, int maxExclusive, TaskIntFunction<R> intFunction) throws InterruptedException, ExecutionException - Specified by:
join_fork_loop
in interfaceForkJoin
- Throws:
InterruptedException
ExecutionException
-
join_fork_loop
public <R> R[] join_fork_loop(IntFunction<R[]> returnValueArrayCreator, int min, int maxExclusive, TaskIntFunction<R> function) throws InterruptedException, ExecutionException - Specified by:
join_fork_loop
in interfaceForkJoin
- Throws:
InterruptedException
ExecutionException
-
join_fork_loop
public <T,R> List<R> join_fork_loop(T[] array, TaskFunction<T, R> function) throws InterruptedException, ExecutionException- Specified by:
join_fork_loop
in interfaceForkJoin
- Throws:
InterruptedException
ExecutionException
-
join_fork_loop
public <T,R> R[] join_fork_loop(IntFunction<R[]> returnValueArrayCreator, T[] array, TaskFunction<T, R> function) throws InterruptedException, ExecutionException- Specified by:
join_fork_loop
in interfaceForkJoin
- Throws:
InterruptedException
ExecutionException
-
join_fork_loop
public <T,R> List<R> join_fork_loop(Iterable<T> iterable, TaskFunction<T, R> function) throws InterruptedException, ExecutionException- Specified by:
join_fork_loop
in interfaceForkJoin
- Throws:
InterruptedException
ExecutionException
-
join_fork_loop_with_index
public <T,R> R[] join_fork_loop_with_index(IntFunction<R[]> returnValueArrayCreator, T[] array, TaskFunctionWithIndex<T, R> functionWithIndex) throws InterruptedException, ExecutionException- Specified by:
join_fork_loop_with_index
in interfaceForkJoin
- Throws:
InterruptedException
ExecutionException
-
join_fork_loop_with_index
public <T,R> List<R> join_fork_loop_with_index(T[] array, TaskFunctionWithIndex<T, R> functionWithIndex) throws InterruptedException, ExecutionException- Specified by:
join_fork_loop_with_index
in interfaceForkJoin
- Throws:
InterruptedException
ExecutionException
-
join_fork_loop_with_index
public <T,R> List<R> join_fork_loop_with_index(Iterable<T> iterable, TaskFunctionWithIndex<T, R> functionWithIndex) throws InterruptedException, ExecutionException- Specified by:
join_fork_loop_with_index
in interfaceForkJoin
- Throws:
InterruptedException
ExecutionException
-
join_void_fork_loop
public void join_void_fork_loop(int min, int maxExclusive, TaskIntConsumer consumer) throws InterruptedException, ExecutionException - Specified by:
join_void_fork_loop
in interfaceForkJoin
- Throws:
InterruptedException
ExecutionException
-
join_void_fork_loop
public <T> void join_void_fork_loop(T[] array, TaskConsumer<T> consumer) throws InterruptedException, ExecutionException - Specified by:
join_void_fork_loop
in interfaceForkJoin
- Throws:
InterruptedException
ExecutionException
-
join_void_fork_loop
public <T> void join_void_fork_loop(Iterable<T> iterable, TaskConsumer<T> consumer) throws InterruptedException, ExecutionException - Specified by:
join_void_fork_loop
in interfaceForkJoin
- Throws:
InterruptedException
ExecutionException
-
join_void_fork_loop_with_index
public <T> void join_void_fork_loop_with_index(T[] array, TaskConsumerWithIndex<T> consumerWithIndex) throws InterruptedException, ExecutionException - Specified by:
join_void_fork_loop_with_index
in interfaceForkJoin
- Throws:
InterruptedException
ExecutionException
-
join_void_fork_loop_with_index
public <T> void join_void_fork_loop_with_index(Iterable<T> iterable, TaskConsumerWithIndex<T> consumerWithIndex) throws InterruptedException, ExecutionException - Specified by:
join_void_fork_loop_with_index
in interfaceForkJoin
- Throws:
InterruptedException
ExecutionException
-
join_void_fork_loop_auto_coarsen
public void join_void_fork_loop_auto_coarsen(int min, int maxExclusive, TaskIntConsumer consumer) throws InterruptedException, ExecutionException - Specified by:
join_void_fork_loop_auto_coarsen
in interfaceForkJoin
- Throws:
InterruptedException
ExecutionException
-
join_void_fork_loop_2d
public void join_void_fork_loop_2d(int aMin, int aMaxExclusive, int bMin, int bMaxExclusive, TaskBiIntConsumer biConsumer) throws InterruptedException, ExecutionException - Specified by:
join_void_fork_loop_2d
in interfaceForkJoin
- Throws:
InterruptedException
ExecutionException
-
join_void_fork_loop_2d_auto_coarsen
public void join_void_fork_loop_2d_auto_coarsen(int aMin, int aMaxExclusive, int bMin, int bMaxExclusive, TaskBiIntConsumer biConsumer) throws InterruptedException, ExecutionException - Specified by:
join_void_fork_loop_2d_auto_coarsen
in interfaceForkJoin
- Throws:
InterruptedException
ExecutionException
-