Package org.apache.ignite.internal.visor
Class VisorJob<A,R>
- java.lang.Object
-
- org.apache.ignite.compute.ComputeJobAdapter
-
- org.apache.ignite.internal.visor.VisorJob<A,R>
-
- Type Parameters:
A- Job argument type.R- Job result type.
- All Implemented Interfaces:
Serializable,Callable<Object>,ComputeJob,PublicAccessJob
- Direct Known Subclasses:
CacheConfigurationCollectorJob,CacheGroupEncryptionTask.ReencryptionBaseJob,SnapshotJob,TxTask.TxJob
public abstract class VisorJob<A,R> extends ComputeJobAdapter implements PublicAccessJob
Base class for Visor jobs.- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description @Nullable Objectexecute()Executes this job.SecurityPermissionSetrequiredPermissions()protected abstract Rrun(A arg)Execution logic of concrete job.-
Methods inherited from class org.apache.ignite.compute.ComputeJobAdapter
argument, arguments, call, cancel, isCancelled, setArguments
-
-
-
-
Field Detail
-
ignite
@IgniteInstanceResource protected transient IgniteEx ignite
Auto-injected grid instance.
-
start
protected transient long start
Job start time.
-
debug
protected boolean debug
Debug flag.
-
-
Constructor Detail
-
VisorJob
protected VisorJob(@Nullable A arg, boolean debug)Create job with specified argument.- Parameters:
arg- Job argument.debug- Flag indicating whether debug information should be printed into node log.
-
-
Method Detail
-
execute
@Nullable public @Nullable 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.
-
run
protected abstract R run(@Nullable A arg) throws IgniteException
Execution logic of concrete job.- Parameters:
arg- Task argument.- Returns:
- Result.
- Throws:
IgniteException- In case of error.
-
requiredPermissions
public SecurityPermissionSet requiredPermissions()
- Specified by:
requiredPermissionsin interfacePublicAccessJob- Returns:
- Set of permissions to be authorized before job execution.
-
-