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

## Class PlatformFullJob

- java.lang.Object
- - org.apache.ignite.internal.processors.platform.compute.PlatformAbstractJob
  - - org.apache.ignite.internal.processors.platform.compute.PlatformFullJob

All Implemented Interfaces:
  Externalizable, Serializable, ComputeJob, PlatformJob

    public class PlatformFullJob
    extends PlatformAbstractJob

Wrapper around job created in native platform.

If the job is expected to be executed locally, it contains only pointer to the corresponding entity in the native platform. In case of topology change or failover, job is serialized on demand.

If we know in advance that the job is to be executed on remote node, then it is serialized into byte array right away.

This class is not thread safe.

See Also:
  Serialized Form

### Field Summary

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

`ignite, job, ptr, task`

### Constructor Summary

Constructors
Constructor and Description
`PlatformFullJob()` `Externalizable` support.
`PlatformFullJob(PlatformContext ctx, PlatformAbstractTask task, long ptr, Object job)` Constructor.

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `cancel()` This method is called when system detects that completion of this job can no longer alter the overall outcome (for example, when parent task has already reduced the results).
`@Nullable Object` `execute0(PlatformContext ctx)` Internal job execution routine.
`void` `readExternal(ObjectInput in)`
`void` `writeExternal(ObjectOutput out)`

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

`createJob, execute, job, pointer, runLocal`

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

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

### Constructor Detail

#### PlatformFullJob

    public PlatformFullJob()

`Externalizable` support.

#### PlatformFullJob

    public PlatformFullJob(PlatformContext ctx,
                           PlatformAbstractTask task,
                           long ptr,
                           Object job)

Constructor.

Parameters:
  `ctx` - Platform context.
  `task` - Parent task.
  `ptr` - Job pointer.
  `job` - Job.

### Method Detail

#### execute0

    @Nullable
    public @Nullable Object execute0(PlatformContext ctx)
                                        throws IgniteCheckedException

Internal job execution routine.

Specified by:
  `execute0` in class `PlatformAbstractJob`
Parameters:
  `ctx` - Interop processor.
Returns:
  Result.
Throws:
  `IgniteCheckedException` - If failed.

#### cancel

    public void cancel()

This method is called when system detects that completion of this job can no longer alter the overall outcome (for example, when parent task has already reduced the results). Job is also cancelled when `IgniteFuture.cancel()` is called.

Note that job cancellation is only a hint, and just like with `Thread.interrupt()` method, it is really up to the actual job instance to gracefully finish execution and exit.

#### writeExternal

    public void writeExternal(ObjectOutput out)
                       throws IOException

Throws:
  `IOException`

#### readExternal

    public void readExternal(ObjectInput in)
                      throws IOException,
                             ClassNotFoundException

Throws:
  `IOException`
  `ClassNotFoundException`

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.9.1
Release Date | : December 9 2020