org.apache.ignite.internal.managers.collision

## Class GridCollisionJobContextAdapter

- java.lang.Object
- - org.apache.ignite.internal.managers.collision.GridCollisionJobContextAdapter

All Implemented Interfaces:
  CollisionJobContext

    public abstract class GridCollisionJobContextAdapter
    extends Object
    implements CollisionJobContext

Adapter for `CollisionJobContext`.

### Constructor Summary

Constructors
`protected` `GridCollisionJobContextAdapter(GridJobWorker jobWorker)`

### Method Summary

Methods
`ComputeJob` `getJob()` Job for this context.
`ComputeJobContext` `getJobContext()` Gets job context.
`GridJobWorker` `getJobWorker()`
`GridJobSessionImpl` `getTaskSession()` Gets current task session associated with this job.

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

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

### Methods inherited from interface org.apache.ignite.spi.collision.CollisionJobContext

`activate, cancel`

### Constructor Detail

#### GridCollisionJobContextAdapter

    protected GridCollisionJobContextAdapter(GridJobWorker jobWorker)

Parameters:
  `jobWorker` - Job worker instance.

### Method Detail

#### getTaskSession

    public GridJobSessionImpl getTaskSession()

Gets current task session associated with this job.

Specified by:
  `getTaskSession` in interface `CollisionJobContext`
Returns:
  Grid task session.

#### getJobContext

    public ComputeJobContext getJobContext()

Gets job context. Use this context to set/get attributes that should be visible only to this job and should not be distributed to other jobs in the grid.

Job context travels with job whenever it gets failed-over to another node, so attributes set on the context on one node will be visible on other nodes this job may potentially end up on.

Specified by:
  `getJobContext` in interface `CollisionJobContext`
Returns:
  Job context.

#### getJobWorker

    public GridJobWorker getJobWorker()

Returns:
  Job worker.

#### getJob

    public ComputeJob getJob()

Job for this context.

Specified by:
  `getJob` in interface `CollisionJobContext`
Returns:
  Job for this context.

2015 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.8.0
Release Date | : December 5 2016