public class GridComputeJobWrapper extends Object implements ComputeJob, Callable<Object>, GridPeerDeployAware
| Constructor and Description |
|---|
GridComputeJobWrapper(ComputeJob job)
Creates a wrapper with given grid
job. |
| Modifier and Type | Method and Description |
|---|---|
Object |
call() |
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).
|
ClassLoader |
classLoader()
Gets class loader for the class.
|
Class<?> |
deployClass()
Gets top level user class being deployed.
|
Object |
execute()
Executes this job.
|
String |
toString() |
ComputeJob |
wrappedJob()
Gets wrapped job.
|
public GridComputeJobWrapper(ComputeJob job)
job.job - Job to wrap.public ComputeJob wrappedJob()
public Class<?> deployClass()
deployClass in interface GridPeerDeployAwarepublic ClassLoader classLoader()
GridPeerDeployAware.deployClass() as well as all of its
dependencies.
Note that in most cases the class loader returned from this method
and the class loader for the class returned from GridPeerDeployAware.deployClass() method
will be the same. If they are not the same, it is required that the class loader
returned from this method still has to be able to load the deploy class and all its
dependencies.
classLoader in interface GridPeerDeployAwarepublic void cancel()
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.
cancel in interface ComputeJobpublic Object execute()
execute in interface ComputeJobnull). This result will be returned
in ComputeJobResult.getData() method passed into
ComputeTask.result(ComputeJobResult, List) task method on caller node.
Follow @ApacheIgnite
Ignite Fabric : ver. 1.0.0 Release Date : March 31 2015