org.apache.ignite.internal.processors.platform.compute

## Class PlatformBroadcastingMultiClosureTask

- java.lang.Object
- - org.apache.ignite.internal.processors.platform.compute.PlatformAbstractTask
  - - org.apache.ignite.internal.processors.platform.compute.PlatformBroadcastingMultiClosureTask

All Implemented Interfaces:
  Serializable, ComputeTask<Object,Void>

    @ComputeTaskNoResultCache
    public class PlatformBroadcastingMultiClosureTask
    extends PlatformAbstractTask

Interop multi-closure task with broadcast semantics.

See Also:
  Serialized Form

### Field Summary

### Fields inherited from class org.apache.ignite.internal.processors.platform.compute.PlatformAbstractTask

`ctx, done, lock, taskPtr`

### Constructor Summary

Constructors
Constructor and Description
`PlatformBroadcastingMultiClosureTask(PlatformContext ctx, long taskPtr)` Constructor.

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `jobs(Collection<PlatformJob> jobs)`
`Map<? extends ComputeJob,ClusterNode>` `map(List<ClusterNode> subgrid, Object arg)` This method is called to map or split grid task into multiple grid jobs.

### Methods inherited from class org.apache.ignite.internal.processors.platform.compute.PlatformAbstractTask

`onDone, reduce, result`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### PlatformBroadcastingMultiClosureTask

    public PlatformBroadcastingMultiClosureTask(PlatformContext ctx,
                                                long taskPtr)

Constructor.

Parameters:
  `ctx` - Platform context.
  `taskPtr` - Task pointer.

### Method Detail

#### map

    @Nullable
    public Map<? extends ComputeJob,ClusterNode> map(List<ClusterNode> subgrid,
                                                               @Nullable
                                                               Object arg)

This method is called to map or split grid task into multiple grid jobs. This is the first method that gets called when task execution starts.

Parameters:
  `subgrid` - Nodes available for this task execution. Note that order of nodes is guaranteed to be randomized by container. This ensures that every time you simply iterate through grid nodes, the order of nodes will be random which over time should result into all nodes being used equally.
  `arg` - Task execution argument. Can be `null`. This is the same argument as the one passed into `Grid#execute(...)` methods.
Returns:
  Map of grid jobs assigned to subgrid node. Unless `ComputeTaskContinuousMapper` is injected into task, if `null` or empty map is returned, exception will be thrown.

#### jobs

    public void jobs(Collection<PlatformJob> jobs)

Parameters:
  `jobs` - Jobs.

2018 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.7.5
Release Date | : June 4 2019