Distributed Closure

The IgniteCompute interface defines the following set of operations to execute in the cluster:

  • broadcast and broadcastAsync:  Broadcast given job to all nodes in the cluster group. The broadcastAsync returns an IgniteFuture and broadcasts asynchronously.
  • run and call: The run() method executes an IgniteRunnable job on a node within the underlying cluster group and it doesn't return any results, but the call() method  executes an IgniteCallable and returns the result of the execution.
  • apply and applyAsync: Executes an IgniteClosure on a node within the underlying cluster group.
  • execute and executeAsync: The execute() method executes a given job in the cluster. The async version returns a ComputeTaskFuture and executes the job asynchronously.
  • affinityRun and affinityCallThese overloaded methods take an affinity key as argument, and execute the given job on the node where the data for provided affinity key is located.

Let's execute our first computation on an Ignite cluster. 

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.226.133.49