Class PlatformFullTask
- java.lang.Object
-
- org.apache.ignite.internal.processors.platform.compute.PlatformAbstractTask
-
- org.apache.ignite.internal.processors.platform.compute.PlatformFullTask
-
- All Implemented Interfaces:
Serializable,ComputeTask<Object,Void>
@ComputeTaskNoResultCache public final class PlatformFullTask extends PlatformAbstractTask
Interop task which requires full execution cycle.- 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 Description PlatformFullTask(PlatformContext ctx, ClusterGroup grp, long taskPtr, long topVer, String taskName, boolean taskSesFullSupport)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull 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.booleantaskSessionFullSupport()trueif distribution of session attributes should be enabled.-
Methods inherited from class org.apache.ignite.internal.processors.platform.compute.PlatformAbstractTask
onDone, reduce, result
-
-
-
-
Constructor Detail
-
PlatformFullTask
public PlatformFullTask(PlatformContext ctx, ClusterGroup grp, long taskPtr, long topVer, String taskName, boolean taskSesFullSupport)
Constructor.- Parameters:
ctx- Platform context.grp- Cluster group.taskPtr- Pointer to the task in the native platform.topVer- Initial topology version.taskName- Task name.taskSesFullSupport-trueif distribution of the session attributes should be enabled.
-
-
Method Detail
-
map
@NotNull public @NotNull Map<? extends ComputeJob,ClusterNode> map(List<ClusterNode> subgrid, @Nullable @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 benull. This is the same argument as the one passed intoGrid#execute(...)methods.- Returns:
- Map of grid jobs assigned to subgrid node. Unless
ComputeTaskContinuousMapperis injected into task, ifnullor empty map is returned, exception will be thrown.
-
taskSessionFullSupport
public boolean taskSessionFullSupport()
trueif distribution of session attributes should be enabled.
-
-