Off-loads some of the heavy-on-Groovy functionality from GParsPoolUtil
Type | Name and description |
---|---|
static NullValue |
MEMOIZE_NULL |
Constructor and description |
---|
GParsPoolUtilHelper
() |
Type | Name and description |
---|---|
static groovy.lang.Closure |
async(groovy.lang.Closure cl) |
static groovy.lang.Closure |
asyncFun(groovy.lang.Closure original, boolean blocking, FJPool pool = null) |
static groovy.lang.Closure<T> |
buildMemoizeFunction(java.util.Map cache, groovy.lang.Closure<T> cl) |
static groovy.lang.Closure<T> |
buildSoftReferenceMemoizeFunction(int protectedCacheSize, java.util.Map cache, groovy.lang.Closure<T> cl) |
static java.util.concurrent.Future<T> |
callAsync(groovy.lang.Closure<T> cl, java.lang.Object... args) |
static void |
cleanUpNullReferences(java.util.Map cache, java.lang.ref.ReferenceQueue queue) |
static boolean |
convertToBoolean(java.lang.Object o) |
static ParallelArray |
createPA(java.lang.Object collection, java.util.concurrent.ForkJoinPool pool) |
static ParallelArray<T> |
createPAFromArray(T[] array, java.util.concurrent.ForkJoinPool pool) |
static ParallelArray<T> |
createPAFromCollection(java.util.Collection<T> collection, java.util.concurrent.ForkJoinPool pool) |
static ParallelArray |
createPAFromCollection(java.lang.Object collection, java.util.concurrent.ForkJoinPool pool) |
static void |
eachParallelPA(ParallelArray pa, groovy.lang.Closure cl) |
static ParallelArrayWithMapping |
eachWithIndex(ParallelArray<java.util.List<java.lang.Object>> parallelArray, groovy.lang.Closure cl) |
static java.util.Collection<T> |
findAllParallelPA(ParallelArray<T> pa, groovy.lang.Closure cl) |
static T |
findAnyParallelPA(ParallelArray<T> pa, groovy.lang.Closure cl) |
static T |
findParallelPA(ParallelArray<T> pa, groovy.lang.Closure cl) |
static T |
foldParallel(java.util.Collection<T> collection, java.lang.Object seed, groovy.lang.Closure cl) |
static java.lang.Object |
foldParallel(java.lang.Object collection, java.lang.Object seed, groovy.lang.Closure cl) |
static java.util.Collection<T> |
grepParallelPA(ParallelArray<T> pa, java.lang.Object filter) |
static T |
injectParallel(java.util.Collection<T> collection, java.lang.Object seed, groovy.lang.Closure cl) |
static java.lang.Object |
injectParallel(java.lang.Object collection, java.lang.Object seed, groovy.lang.Closure cl) |
static java.lang.Object |
makeConcurrent(java.lang.Object collection) Overrides the iterative methods like each(), collect() and such, so that they call their parallel variants from the GParsPoolUtil class like eachParallel(), collectParallel() and such. |
static java.lang.Object |
makeSequential(java.lang.Object collection) Gives the iterative methods like each() or find() the original sequential semantics. |
private static FJPool |
retrieveFJPool() |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(), java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Overrides the iterative methods like each(), collect() and such, so that they call their parallel variants from the GParsPoolUtil class like eachParallel(), collectParallel() and such. The first time it is invoked on a collection the method creates a TransparentParallel class instance and mixes it in the object it is invoked on. After mixing-in, the isConcurrent() method will return true. Delegates to GParsPoolUtil.makeConcurrent().
collection
- The object to make transparentGives the iterative methods like each() or find() the original sequential semantics.
collection
- The collection to apply the change toCopyright © 2008–2014 Václav Pech. All Rights Reserved.