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

## Class PlatformClosureJob

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

All Implemented Interfaces:
  Externalizable, Serializable, ComputeJob, PlatformJob

    public class PlatformClosureJob
    extends PlatformAbstractJob

Light-weight interop job. Comparing to regular job, this guy has simpler logic because we should not bother with delayed serialization and cancellation.

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
`PlatformClosureJob()` `Externalizable` support.
`PlatformClosureJob(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).
`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

#### PlatformClosureJob

    public PlatformClosureJob()

`Externalizable` support.

#### PlatformClosureJob

    public PlatformClosureJob(PlatformAbstractTask task,
                              long ptr,
                              Object job)

Constructor.

Parameters:
  `task` - Parent task.
  `ptr` - Job pointer.
  `job` - Job.

### Method Detail

#### execute0

    @Nullable
    public 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`

2018 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 2.6.0
Release Date | : July 10 2018