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

## Class GridDhtUnlockRequest<K,V>

- java.lang.Object
- - org.apache.ignite.plugin.extensions.communication.MessageAdapter
  - - org.apache.ignite.internal.processors.cache.GridCacheMessage<K,V>
    - - org.apache.ignite.internal.processors.cache.distributed.GridDistributedBaseMessage<K,V>
      - - org.apache.ignite.internal.processors.cache.distributed.GridDistributedUnlockRequest<K,V>
        - - org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtUnlockRequest<K,V>

All Implemented Interfaces:
  Serializable, GridCacheDeployable, GridCacheVersionable

    public class GridDhtUnlockRequest<K,V>
    extends GridDistributedUnlockRequest<K,V>

DHT cache unlock request.

See Also:
  Serialized Form

### Nested Class Summary

### Nested classes/interfaces inherited from class org.apache.ignite.plugin.extensions.communication.MessageAdapter

`MessageAdapter.Type`

### Field Summary

### Fields inherited from class org.apache.ignite.internal.processors.cache.distributed.GridDistributedBaseMessage

`ver`

### Fields inherited from class org.apache.ignite.internal.processors.cache.GridCacheMessage

`CACHE_MSG_INDEX_FIELD_NAME, cacheId, MAX_CACHE_MSG_LOOKUP_INDEX`

### Fields inherited from class org.apache.ignite.plugin.extensions.communication.MessageAdapter

`reader, readState`

### Constructor Summary

Constructors
Constructor and Description
`GridDhtUnlockRequest()` Empty constructor required by `Externalizable`.
`GridDhtUnlockRequest(int cacheId, int dhtCnt)`

### Method Summary

Methods
`void` `addNearKey(K key, byte[] keyBytes, GridCacheSharedContext<K,V> ctx)` Adds a Near key.
`byte` `directType()` Gets message type.
`void` `finishUnmarshal(GridCacheSharedContext<K,V> ctx, ClassLoader ldr)` This method is called after the message is deserialized and is responsible for unmarshalling state marshalled in `GridCacheMessage.prepareMarshal(GridCacheSharedContext)` method.
`List<byte[]>` `nearKeyBytes()`
`List<K>` `nearKeys()`
`boolean` `readFrom(ByteBuffer buf)` Reads this message from provided byte buffer.
`String` `toString()`
`boolean` `writeTo(ByteBuffer buf, MessageWriter writer)` Writes this message to provided byte buffer.

### Methods inherited from class org.apache.ignite.internal.processors.cache.distributed.GridDistributedUnlockRequest

`addKey, keyBytes, keys, prepareMarshal`

### Methods inherited from class org.apache.ignite.internal.processors.cache.distributed.GridDistributedBaseMessage

`candidatesByIndex, candidatesByIndex, candidatesByKey, candidatesByKey, candidatesByKey, committedVersions, completedVersions, keysCount, rolledbackVersions, version, version`

### Methods inherited from class org.apache.ignite.internal.processors.cache.GridCacheMessage

`allowForStartup, cacheId, cacheId, classError, deployInfo, ignoreClassErrors, lookupIndex, marshalBooleanLinkedMap, marshalCollection, marshalFilter, marshalInfo, marshalInfos, marshalInvokeArguments, marshalTx, marshalValuesCollection, messageId, nextIndexId, onClassError, prepare, prepareFilter, prepareObject, prepareObjects, topologyVersion, transactional, transferExpiryPolicy, unmarshalBooleanLinkedMap, unmarshalCollection, unmarshalFilter, unmarshalInfo, unmarshalInfos, unmarshalInvokeArguments, unmarshalTx, unmarshalValueBytesCollection`

### Methods inherited from class org.apache.ignite.plugin.extensions.communication.MessageAdapter

`setReader, skipRecovery`

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

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

### Methods inherited from interface org.apache.ignite.internal.processors.cache.GridCacheDeployable

`deployInfo, prepare`

### Constructor Detail

#### GridDhtUnlockRequest

    public GridDhtUnlockRequest()

Empty constructor required by `Externalizable`.

#### GridDhtUnlockRequest

    public GridDhtUnlockRequest(int cacheId,
                        int dhtCnt)

Parameters:
  `cacheId` - Cache ID.
  `dhtCnt` - Key count.

### Method Detail

#### nearKeyBytes

    public List<byte[]> nearKeyBytes()

Returns:
  Near keys.

#### nearKeys

    public List<K> nearKeys()

Returns:
  Near keys.

#### addNearKey

    public void addNearKey(K key,
                  byte[] keyBytes,
                  GridCacheSharedContext<K,V> ctx)
                    throws IgniteCheckedException

Adds a Near key.

Parameters:
  `key` - Key.
  `keyBytes` - Key bytes.
  `ctx` - Context.
Throws:
  `IgniteCheckedException` - If failed.

#### finishUnmarshal

    public void finishUnmarshal(GridCacheSharedContext<K,V> ctx,
                       ClassLoader ldr)
                         throws IgniteCheckedException

This method is called after the message is deserialized and is responsible for unmarshalling state marshalled in `GridCacheMessage.prepareMarshal(GridCacheSharedContext)` method.

Overrides:
  `finishUnmarshal` in class `GridDistributedUnlockRequest<K,V>`
Parameters:
  `ctx` - Context.
  `ldr` - Class loader.
Throws:
  `IgniteCheckedException` - If failed.

#### toString

    public String toString()

Overrides:
  `toString` in class `GridDistributedUnlockRequest<K,V>`

#### writeTo

    public boolean writeTo(ByteBuffer buf,
                  MessageWriter writer)

Writes this message to provided byte buffer.

Overrides:
  `writeTo` in class `GridDistributedUnlockRequest<K,V>`
Parameters:
  `buf` - Byte buffer.
  `writer` - Writer.
Returns:
  Whether message was fully written.

#### readFrom

    public boolean readFrom(ByteBuffer buf)

Reads this message from provided byte buffer.

Overrides:
  `readFrom` in class `GridDistributedUnlockRequest<K,V>`
Parameters:
  `buf` - Byte buffer.
Returns:
  Whether message was fully read.

#### directType

    public byte directType()

Gets message type.

Overrides:
  `directType` in class `GridDistributedUnlockRequest<K,V>`
Returns:
  Message type.

2015 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.0.0-RC1
Release Date | : February 17 2015