如何从GridClosure访问arg / args(由`GridCompute.apply()`传递)?

时间:2014-07-07 11:04:59

标签: caching closures gridgain grid-computing

GridCompute.apply()允许传递一个argCollection<> args,但我看不到如何在GridClosure内访问它/它们?

1 个答案:

答案 0 :(得分:1)

GridGain将创建与参数一样多的闭包,并将单个参数传递给GridClosure.apply(arg)方法。

所以,如果你传递一个Collection&lt;&gt;在10个args中,GridGain将创建10个闭包,每个参数对应一个,并将在网格中均匀地平衡它们。