cachingclosuresgridgaingrid-computing

How to access arg/args (passed by `GridCompute.apply()`) from GridClosure?


GridCompute.apply() allows to pass a single arg or Collection<> args but I don't see how to access it/them inside GridClosure?


Solution

  • GridGain will create as many closures as there are arguments and will pass individual argument into GridClosure.apply(arg) method.

    So, if you pass a Collection<> of 10 args, GridGain will create 10 closures, one for each argument, and will evenly load balance them across the grid.