Class GridClosureProcessor.C2<R>
- java.lang.Object
-
- org.apache.ignite.internal.processors.closure.GridClosureProcessor.C2<R>
-
- All Implemented Interfaces:
Serializable,Binarylizable,ComputeJob,GridInternalWrapper<Callable>,GridNoImplicitInjection
- Direct Known Subclasses:
GridClosureProcessor.C2MLA
- Enclosing class:
- GridClosureProcessor
public static class GridClosureProcessor.C2<R> extends Object implements ComputeJob, Binarylizable, GridNoImplicitInjection, GridInternalWrapper<Callable>
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description C2()
-
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).Objectexecute()Executes this job.voidreadBinary(BinaryReader reader)Reads fields from provided reader.StringtoString()CallableuserObject()Get user object where resources must be injected.voidwriteBinary(BinaryWriter writer)Writes fields to provided writer.
-
-
-
Field Detail
-
c
@GridToStringInclude protected Callable<R> c
-
-
Method Detail
-
execute
public Object execute()
Executes this job.- Specified by:
executein interfaceComputeJob- Returns:
- Job execution result (possibly
null). This result will be returned inComputeJobResult.getData()method passed intoComputeTask.result(ComputeJobResult, List)task method on caller node.
-
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.- Specified by:
cancelin interfaceComputeJob
-
writeBinary
public void writeBinary(BinaryWriter writer) throws BinaryObjectException
Writes fields to provided writer.- Specified by:
writeBinaryin interfaceBinarylizable- Parameters:
writer- Binary object writer.- Throws:
BinaryObjectException- In case of error.
-
readBinary
public void readBinary(BinaryReader reader) throws BinaryObjectException
Reads fields from provided reader.- Specified by:
readBinaryin interfaceBinarylizable- Parameters:
reader- Binary object reader.- Throws:
BinaryObjectException- In case of error.
-
userObject
public Callable userObject()
Get user object where resources must be injected.- Specified by:
userObjectin interfaceGridInternalWrapper<R>- Returns:
- User object.
-
-