Enhances objects by being mixed-in either within a GParsPool.withPool() block or after enhancement by the ParallelEnhancer through the makeConcurrent() method. It overrides the iterative methods, like each, collect and such to delegate to eachParallel, collectParallel and other parallel iterative methods. The collections returned from collect(), findAll() and grep() are again mixed with a TransparentParallel instance, so their iterative methods are transparently parallel as well. Author: Vaclav Pech, Dierk Koenig Date: Oct 30, 2009
Modifiers | Name | Description |
---|---|---|
private boolean |
concurrencyActive |
Constructor and description |
---|
TransparentParallel
() |
Type | Name and description |
---|---|
java.lang.Object |
any(groovy.lang.Closure yield) |
java.lang.Object |
collect(groovy.lang.Closure yield) |
java.lang.Object |
collectMany(groovy.lang.Closure yield) |
java.lang.Object |
count(java.lang.Object filter) |
java.lang.Object |
each(groovy.lang.Closure yield) |
java.lang.Object |
eachWithIndex(groovy.lang.Closure yield) |
java.lang.Object |
every(groovy.lang.Closure yield) |
java.lang.Object |
find(groovy.lang.Closure yield) |
java.lang.Object |
findAll(groovy.lang.Closure yield) |
java.lang.Object |
findAny(groovy.lang.Closure yield) |
java.lang.Object |
fold(groovy.lang.Closure yield) |
java.lang.Object |
fold(java.lang.Object seed, groovy.lang.Closure yield) |
java.lang.Object |
grep(java.lang.Object filter) |
java.lang.Object |
groupBy(groovy.lang.Closure yield) |
java.lang.Object |
inject(groovy.lang.Closure yield) |
java.lang.Object |
inject(java.lang.Object seed, groovy.lang.Closure yield) |
boolean |
isConcurrencyActive() Indicates, whether the iterative methods like each() or collect() should have a concurrent or a sequential semantics. |
boolean |
isConcurrent() Indicates, whether the iterative methods like each() or collect() have been made parallel. |
java.lang.Object |
max(groovy.lang.Closure yield) |
java.lang.Object |
max() |
java.lang.Object |
min(groovy.lang.Closure yield) |
java.lang.Object |
min() |
void |
setConcurrencyActive(boolean flag) Turns concurrency on and off as needed |
java.lang.Object |
split(groovy.lang.Closure yield) |
java.lang.Object |
sum() |
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() |
Indicates, whether the iterative methods like each() or collect() should have a concurrent or a sequential semantics.
Indicates, whether the iterative methods like each() or collect() have been made parallel. Always true once a collection is enhanced through the makeConcurrent() method. The concurrencyActive flag then indicates, whether the enhanced collection has concurrent or the original sequential semantics
Turns concurrency on and off as needed
flag
- True, if the collection processing methods should have parallel semantics, false if they should call the original sequential implementationCopyright © 2008–2014 Václav Pech. All Rights Reserved.