public class GridifyJobAdapter extends GridComputeJobAdapter
gridify jobs. In addition to
functionality provided in GridComputeJobAdapter adapter, this adapter
provides default implementation of execute() method,
which reflectively executes grid-enabled method based on information provided
in GridifyArgument parameter.
Note this adapter is only useful when passing GridifyArgument to
remote jobs. In many cases, remote jobs will not require GridifyArgument
as they will execute their code without reflection, hence the regular
GridComputeJobAdapter should be used.
See Gridify documentation for more information about execution of
gridified methods.
Gridify,
Serialized Form| Constructor and Description |
|---|
GridifyJobAdapter(GridifyArgument arg)
Initializes job with argument.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
execute()
Provides default implementation for execution of grid-enabled methods.
|
argument, call, cancel, isCancelled, setArgumentspublic GridifyJobAdapter(GridifyArgument arg)
arg - Job argument.public Object execute() throws GridException
GridifyArgument
type. It attempts to reflectively execute a method based on information
provided in the argument and returns the return value of the method.
If some exception occurred during execution, then it will be thrown out of this method.
null). This result will be returned
in GridComputeJobResult.getData() method passed into
GridComputeTask.result(GridComputeJobResult, List) task method on caller node.GridException - If job execution caused an exception. This exception will be
returned in GridComputeJobResult.getException() method passed into
GridComputeTask.result(GridComputeJobResult, List) task method on caller node.
If execution produces a RuntimeException or Error, then
it will be wrapped into GridException.Copyright © 2014. All rights reserved.