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,PlatformSecurityAwareJob,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. NOTE: Legacy. New implementations should usePlatformAbstractFuncand derivatives instead.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description PlatformClosureJob()Externalizablesupport.PlatformClosureJob(PlatformAbstractTask task, long ptr, Object job, String jobName)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcancel()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 Objectexecute0(PlatformContext ctx)Internal job execution routine.voidreadExternal(ObjectInput in)voidwriteExternal(ObjectOutput out)
-
-
-
Constructor Detail
-
PlatformClosureJob
public PlatformClosureJob()
Externalizablesupport.
-
PlatformClosureJob
public PlatformClosureJob(PlatformAbstractTask task, long ptr, Object job, String jobName)
Constructor.- Parameters:
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:
execute0in classPlatformAbstractJob- 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 whenIgniteFuture.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:
IOExceptionClassNotFoundException
-
-