org.apache.ignite.internal.processors.cache

## Class GridCacheAdapter.TopologyVersionAwareJob

- java.lang.Object
- - org.apache.ignite.compute.ComputeJobAdapter
  - - org.apache.ignite.internal.processors.cache.GridCacheAdapter.TopologyVersionAwareJob

All Implemented Interfaces:
  Serializable, Callable<Object>, ComputeJob

Enclosing class:
  GridCacheAdapter<K,V>

    protected abstract static class GridCacheAdapter.TopologyVersionAwareJob
    extends ComputeJobAdapter

Delayed callable class.

See Also:
  Serialized Form

### Field Summary

Fields
`protected String` `cacheName` Cache name.
`protected Ignite` `ignite` Injected grid instance.
`protected ComputeJobContext` `jobCtx` Injected job context.
`protected AffinityTopologyVersion` `topVer` Affinity topology version.

### Constructor Summary

Constructors
Constructor and Description
`GridCacheAdapter.TopologyVersionAwareJob(String cacheName, AffinityTopologyVersion topVer)`

### Method Summary

Methods
`Object` `execute()` Executes this job.
`protected abstract Object` `localExecute(IgniteInternalCache cache)`

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

`argument, call, cancel, isCancelled, setArguments`

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

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

### Field Detail

#### jobCtx

    @JobContextResource
    protected ComputeJobContext jobCtx

Injected job context.

#### ignite

    @IgniteInstanceResource
    protected Ignite ignite

Injected grid instance.

#### topVer

    protected final AffinityTopologyVersion topVer

Affinity topology version.

#### cacheName

    protected final String cacheName

Cache name.

### Constructor Detail

#### GridCacheAdapter.TopologyVersionAwareJob

    public GridCacheAdapter.TopologyVersionAwareJob(String cacheName,
                                            AffinityTopologyVersion topVer)

Parameters:
  `cacheName` - Cache name.
  `topVer` - Affinity topology version.

### Method Detail

#### execute

    @Nullable
    public final 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.

#### localExecute

    @Nullable
    protected abstract Object localExecute(@Nullable
                               IgniteInternalCache cache)

Parameters:
  `cache` - Cache.
Returns:
  Local execution result.

2015 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.3.0-incubating
Release Date | : July 10 2015