Groovy Documentation

gpars
Class TransparentParallel

java.lang.Object
  gpars.TransparentParallel

class TransparentParallel

Enhances objects by being mixed-in either within a GParsPool.withPool() block or after enhancement by the ParallelEnhancer through the makeTransparent() 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


Constructor Summary
TransparentParallel()

 
Method Summary
def any(groovy.lang.Closure yield)

def collect(groovy.lang.Closure yield)

def count(def filter)

def each(groovy.lang.Closure yield)

def eachWithIndex(groovy.lang.Closure yield)

def every(groovy.lang.Closure yield)

def find(groovy.lang.Closure yield)

def findAll(groovy.lang.Closure yield)

def findAny(groovy.lang.Closure yield)

def fold(groovy.lang.Closure yield)

def fold(def seed, groovy.lang.Closure yield)

def grep(def filter)

def groupBy(groovy.lang.Closure yield)

boolean isTransparent()

Indicates, whether the iterative methods like each() or collect() have been made parallel.

def max(groovy.lang.Closure yield)

def max()

def min(groovy.lang.Closure yield)

def min()

def split(groovy.lang.Closure yield)

def sum()

 
Methods inherited from class Object
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll
 

Constructor Detail

TransparentParallel

TransparentParallel()


 
Method Detail

any

public final def any(groovy.lang.Closure yield)


collect

public final def collect(groovy.lang.Closure yield)


count

public final def count(def filter)


each

public final def each(groovy.lang.Closure yield)


eachWithIndex

public final def eachWithIndex(groovy.lang.Closure yield)


every

public final def every(groovy.lang.Closure yield)


find

public final def find(groovy.lang.Closure yield)


findAll

public final def findAll(groovy.lang.Closure yield)


findAny

public final def findAny(groovy.lang.Closure yield)


fold

public final def fold(groovy.lang.Closure yield)


fold

public final def fold(def seed, groovy.lang.Closure yield)


grep

public final def grep(def filter)


groupBy

public final def groupBy(groovy.lang.Closure yield)


isTransparent

public boolean isTransparent()
Indicates, whether the iterative methods like each() or collect() have been made parallel.


max

public final def max(groovy.lang.Closure yield)


max

public final def max()


min

public final def min(groovy.lang.Closure yield)


min

public final def min()


split

public final def split(groovy.lang.Closure yield)


sum

public final def sum()


 

Groovy Documentation