|
org.codehaus.gpars | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | PROPERTY | CONSTR | METHOD | DETAIL: FIELD | PROPERTY | CONSTR | METHOD |
java.lang.Object groovyx.gpars.pa.GParsPoolUtilHelper
class GParsPoolUtilHelper
Off-loads some of the heavy-on-Groovy functionality from GParsPoolUtil
Property Summary | |
---|---|
static NullValue |
MEMOIZE_NULL
|
Constructor Summary | |
GParsPoolUtilHelper()
|
Method Summary | |
---|---|
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
|
buildMemoizeFunction(java.util.Map cache, groovy.lang.Closure cl)
|
static groovy.lang.Closure
|
buildSoftReferenceMemoizeFunction(int protectedCacheSize, java.util.Map cache, groovy.lang.Closure cl)
|
static java.util.concurrent.Future
|
callAsync(groovy.lang.Closure 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, ForkJoinPool pool)
|
static ParallelArray
|
createPAFromArray(java.lang.Object[] array, ForkJoinPool pool)
|
static ParallelArray
|
createPAFromCollection(java.util.Collection collection, ForkJoinPool pool)
|
static ParallelArray
|
createPAFromCollection(java.lang.Object collection, ForkJoinPool pool)
|
static void
|
eachParallelPA(ParallelArray pa, groovy.lang.Closure cl)
|
static ParallelArrayWithMapping
|
eachWithIndex(ParallelArray parallelArray, groovy.lang.Closure cl)
|
static java.util.Collection
|
findAllParallelPA(ParallelArray pa, groovy.lang.Closure cl)
|
static java.lang.Object
|
findAnyParallelPA(ParallelArray pa, groovy.lang.Closure cl)
|
static java.lang.Object
|
findParallelPA(ParallelArray pa, groovy.lang.Closure cl)
|
static java.lang.Object
|
foldParallel(java.util.Collection 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
|
grepParallelPA(ParallelArray pa, java.lang.Object filter)
|
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 java.lang.Object | |
---|---|
java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#wait(long, int), 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() |
Property Detail |
---|
static final NullValue MEMOIZE_NULL
Constructor Detail |
---|
GParsPoolUtilHelper()
Method Detail |
---|
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 buildMemoizeFunction(java.util.Map cache, groovy.lang.Closure cl)
static groovy.lang.Closure buildSoftReferenceMemoizeFunction(int protectedCacheSize, java.util.Map cache, groovy.lang.Closure cl)
static java.util.concurrent.Future callAsync(groovy.lang.Closure cl, java.lang.Object... args)
static void cleanUpNullReferences(java.util.Map cache, java.lang.ref.ReferenceQueue queue)
static boolean convertToBoolean(java.lang.Object o)
@SuppressWarnings("GroovyMultipleReturnPointsPerMethod") static ParallelArray createPA(java.lang.Object collection, ForkJoinPool pool)
static ParallelArray createPAFromArray(java.lang.Object[] array, ForkJoinPool pool)
static ParallelArray createPAFromCollection(java.util.Collection collection, ForkJoinPool pool)
static ParallelArray createPAFromCollection(java.lang.Object collection, ForkJoinPool pool)
static void eachParallelPA(ParallelArray pa, groovy.lang.Closure cl)
static ParallelArrayWithMapping eachWithIndex(ParallelArray parallelArray, groovy.lang.Closure cl)
static java.util.Collection findAllParallelPA(ParallelArray pa, groovy.lang.Closure cl)
static java.lang.Object findAnyParallelPA(ParallelArray pa, groovy.lang.Closure cl)
static java.lang.Object findParallelPA(ParallelArray pa, groovy.lang.Closure cl)
@SuppressWarnings("GroovyAssignabilityCheck") static java.lang.Object foldParallel(java.util.Collection 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 grepParallelPA(ParallelArray pa, java.lang.Object filter)
static java.lang.Object makeConcurrent(java.lang.Object collection)
collection
- The object to make transparent
static java.lang.Object makeSequential(java.lang.Object collection)
collection
- The collection to apply the change to
private static FJPool retrieveFJPool()
Copyright © 2008–2012 Václav Pech. All Rights Reserved.