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,PlatformSecurityAwareJob,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
-
-
Constructor Summary
Constructors Constructor Description PlatformFullJob()Externalizablesupport.PlatformFullJob(PlatformContext ctx, 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
-
PlatformFullJob
public PlatformFullJob()
Externalizablesupport.
-
PlatformFullJob
public PlatformFullJob(PlatformContext ctx, PlatformAbstractTask task, long ptr, Object job, String jobName)
Constructor.- Parameters:
ctx- Platform context.task- Parent task.ptr- Job pointer.job- Job.jobName- Job name.
-
-
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
-
-