org.apache.ignite.internal.processors.cache.distributed.near

## Class GridNearLockMapping

- java.lang.Object
- - org.apache.ignite.internal.processors.cache.distributed.near.GridNearLockMapping

    public class GridNearLockMapping
    extends Object

Key-to node mapping.

### Constructor Summary

Constructors
Constructor and Description
`GridNearLockMapping(ClusterNode node, KeyCacheObject firstKey)` Creates near lock mapping for specified node and key.

### Method Summary

Methods
`void` `addKey(KeyCacheObject key)`
`Collection<KeyCacheObject>` `distributedKeys()`
`void` `distributedKeys(Collection<KeyCacheObject> distributedKeys)`
`Collection<KeyCacheObject>` `mappedKeys()`
`ClusterNode` `node()`
`GridNearLockRequest` `request()`
`void` `request(GridNearLockRequest req)`
`String` `toString()`

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

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

### Constructor Detail

#### GridNearLockMapping

    public GridNearLockMapping(ClusterNode node,
                       KeyCacheObject firstKey)

Creates near lock mapping for specified node and key.

Parameters:
  `node` - Node.
  `firstKey` - First key in mapped keys collection.

### Method Detail

#### node

    public ClusterNode node()

Returns:
  Node to which keys are mapped.

#### mappedKeys

    public Collection<KeyCacheObject> mappedKeys()

Returns:
  Mapped keys.

#### addKey

    public void addKey(KeyCacheObject key)

Parameters:
  `key` - Key to add to mapping.

#### request

    @Nullable
    public GridNearLockRequest request()

Returns:
  Near lock request.

#### request

    public void request(GridNearLockRequest req)

Parameters:
  `req` - Near lock request.

#### distributedKeys

    public Collection<KeyCacheObject> distributedKeys()

Returns:
  Collection of distributed keys.

#### distributedKeys

    public void distributedKeys(Collection<KeyCacheObject> distributedKeys)

Parameters:
  `distributedKeys` - Collection of distributed keys.

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

2015 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.0.0-RC3
Release Date | : March 24 2015