|
org.codehaus.gpars | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object groovyx.gpars.TransparentParallel
final class TransparentParallel
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
Field Summary | |
---|---|
private boolean |
concurrencyActive
|
Constructor Summary | |
TransparentParallel()
|
Method Summary | |
---|---|
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 java.lang.Object | |
---|---|
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), 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() |
Field Detail |
---|
private boolean concurrencyActive
Constructor Detail |
---|
TransparentParallel()
Method Detail |
---|
final java.lang.Object any(groovy.lang.Closure yield)
final java.lang.Object collect(groovy.lang.Closure yield)
final java.lang.Object collectMany(groovy.lang.Closure yield)
final java.lang.Object count(java.lang.Object filter)
final java.lang.Object each(groovy.lang.Closure yield)
final java.lang.Object eachWithIndex(groovy.lang.Closure yield)
final java.lang.Object every(groovy.lang.Closure yield)
final java.lang.Object find(groovy.lang.Closure yield)
final java.lang.Object findAll(groovy.lang.Closure yield)
final java.lang.Object findAny(groovy.lang.Closure yield)
@java.lang.Deprecated final java.lang.Object fold(groovy.lang.Closure yield)
@java.lang.Deprecated final java.lang.Object fold(java.lang.Object seed, groovy.lang.Closure yield)
final java.lang.Object grep(java.lang.Object filter)
final java.lang.Object groupBy(groovy.lang.Closure yield)
final java.lang.Object inject(groovy.lang.Closure yield)
final java.lang.Object inject(java.lang.Object seed, groovy.lang.Closure yield)
@groovy.transform.CompileStatic(value = TypeCheckingMode.PASS) boolean isConcurrencyActive()
@groovy.transform.CompileStatic(value = TypeCheckingMode.PASS) boolean isConcurrent()
final java.lang.Object max(groovy.lang.Closure yield)
final java.lang.Object max()
final java.lang.Object min(groovy.lang.Closure yield)
final java.lang.Object min()
@groovy.transform.CompileStatic(value = TypeCheckingMode.PASS) void setConcurrencyActive(boolean flag)
flag
- True, if the collection processing methods should have parallel semantics, false if they should call the original sequential implementation
final java.lang.Object split(groovy.lang.Closure yield)
final java.lang.Object sum()
Copyright © 2008–2013 Václav Pech. All Rights Reserved.