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

Direct Known Subclasses:
  VisorCacheConfigurationCollectorJob, VisorNodeConfigurationCollectorJob, VisorNodeDataCollectorJob, VisorNodeEventsCollectorTask.VisorNodeEventsCollectorJob

    public abstract class VisorJob<A,R>
    extends ComputeJobAdapter

Base class for Visor jobs.

See Also:
  Serialized Form

### Field Summary

Fields
`protected boolean` `debug` Debug flag.
`protected IgniteEx` `ignite` Auto-injected grid instance.
`protected long` `start` Job start time.

### Constructor Summary

Constructors
`protected` `VisorJob(A arg, boolean debug)` Create job with specified argument.

### Method Summary

All Methods Instance Methods Abstract Methods Concrete Methods
`Object` `execute()` Executes this job.
`protected abstract R` `run(A arg)` Execution logic of concrete job.

### Methods inherited from class org.apache.ignite.compute.ComputeJobAdapter

`argument, arguments, call, cancel, isCancelled, setArguments`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### 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 Object execute()

Executes this job.

Returns:
  Job execution result (possibly `null`). This result will be returned in `ComputeJobResult.getData()` method passed into `ComputeTask.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.

2018 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 2.4.0
Release Date | : March 5 2018