Uses of Class
fj.control.parallel.Strategy
Packages that use Strategy
Package
Description
Types that set the premise for the existence of Functional Java.
Parallelization strategies.
Common algebraic data types.
-
Uses of Strategy in fj
-
Uses of Strategy in fj.control.parallel
Fields in fj.control.parallel declared as StrategyMethods in fj.control.parallel that return StrategyModifier and TypeMethodDescriptionStrategy.callableStrategy
(Strategy<Callable<A>> s) Provides a normalising strategy that fully evaluates its Callable argument.static <A> Strategy
<A> Strategy.completionStrategy
(CompletionService<A> s) Provides a parallelization strategy that uses a CompletionService to control the method and degree of parallelism, and where each parallel task's completion is registered with the service.Maps the given transformation across this strategy's codomain (Invariant Functor pattern).static <A> Strategy
<A> Strategy.errorStrategy
(Strategy<A> s, Effect1<Error> e) Provides an error-handling strategy.Strategy.errorStrategy
(Effect1<Error> e) Provides an error-handling strategy.static <A> Strategy
<A> Strategy.executorStrategy
(ExecutorService s) Provides a parallelization strategy that uses an ExecutorService to control the method and degree of parallelism.static <A> Strategy
<A> Strategy.idStrategy()
Provides a strategy that performs no evaluation of its argument.Maps the given transformation across this strategy's domain (Invariant Functor pattern).static <A> Strategy
<A> Strategy.seqStrategy()
Provides a strategy that performs sequential (non-concurrent) evaluation of its argument.static <A> Strategy
<A> Strategy.simpleThreadStrategy()
Provides a simple parallelization strategy that creates, and discards, a new thread for every evaluation.static <A> Strategy
<A> Constructs a strategy from the given evaluation function.<B> Strategy
<B> Maps the given bijective transformation across this strategy (Exponential Functor pattern).Methods in fj.control.parallel with parameters of type StrategyModifier and TypeMethodDescriptionstatic <A> Actor
<A> Creates a new Actor that uses the given parallelization strategy and has the given side-effect.static <A> Actor
<A> Creates a new Actor that uses the given parallelization strategy and has the given side-effect.Strategy.callableStrategy
(Strategy<Callable<A>> s) Provides a normalising strategy that fully evaluates its Callable argument.static <A> Strategy
<A> Strategy.errorStrategy
(Strategy<A> s, Effect1<Error> e) Provides an error-handling strategy.Performs a right-fold reduction across a list in constant stack space.Performs a right-fold reduction across a Stream in constant stack space.static <A> Promise
<A> Turns a product of a promise into just a promise.private static <A> Promise
<A> Binds the given function in parallel across the given array, using the given strategy, with a final join.Binds the given function in parallel across the given list, using the given strategy, with a final join.Strategy.parListChunk
(Strategy<List<A>> s, int chunkLength, List<P1<A>> as) Sequentially evaluates chunks (sub-sequences) of a list in parallel.static ParModule
Constructor method for ParModuleProvides a first-class unit function for promises.Transforms any function so that it returns a promise of a value instead of an actual value.static <A> Promise
<A> Promises to provide the value of the given 1-product, in the future.Provides a promise to call the given Callable in the future.static <T> Actor
<T> Actor.queueActor
(Strategy<Unit> s, Effect1<T> ea) An Actor equipped with a queue and which is guaranteed to process one message at a time.First-class version of the sequence function through a List.Turns a List of promises into a single promise of a List.Turns a Stream of promises into a single promise of a Stream.Transforms a product of a promise to a promise of a product.First-class version of the sequence function through a Stream.Constructors in fj.control.parallel with parameters of type Strategy -
Uses of Strategy in fj.data
Modifier and TypeMethodDescriptionSort this stream according to the given ordering, using a parallel Quick Sort algorithm that uses the given parallelisation strategy.