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

## Class GridNearSingleGetRequest

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

All Implemented Interfaces:
  Serializable, GridCacheDeployable, Message

    public class GridNearSingleGetRequest
    extends GridCacheMessage
    implements GridCacheDeployable

See Also:
  Serialized Form

### Field Summary

Fields
`static int` `ADD_READER_FLAG_MASK`
`static int` `NEED_ENTRY_INFO_FLAG_MASK`
`static int` `NEED_VER_FLAG_MASK`
`static int` `READ_THROUGH_FLAG_MASK`
`static int` `SKIP_VALS_FLAG_MASK`

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

`addDepInfo, CACHE_MSG_INDEX_FIELD_NAME, cacheId, forceAddDepInfo, MAX_CACHE_MSG_LOOKUP_INDEX`

### Constructor Summary

Constructors
Constructor and Description
`GridNearSingleGetRequest()` Empty constructor required for `Message`.
`GridNearSingleGetRequest(int cacheId, long futId, KeyCacheObject key, boolean readThrough, AffinityTopologyVersion topVer, UUID subjId, int taskNameHash, long accessTtl, boolean skipVals, boolean addReader, boolean needVer, boolean addDepInfo)`

### Method Summary

Methods
`long` `accessTtl()`
`boolean` `addDeploymentInfo()` Deployment enabled flag indicates whether deployment info has to be added to this message.
`boolean` `addReader()`
`byte` `directType()` Gets message type.
`byte` `fieldsCount()` Gets fields count.
`void` `finishUnmarshal(GridCacheSharedContext ctx, ClassLoader ldr)` This method is called after the message is deserialized and is responsible for unmarshalling state marshalled in `GridCacheMessage.prepareMarshal(GridCacheSharedContext)` method.
`long` `futureId()`
`KeyCacheObject` `key()`
`boolean` `needEntryInfo()`
`boolean` `needVersion()`
`void` `prepareMarshal(GridCacheSharedContext ctx)` This method is called before the whole message is serialized and is responsible for pre-marshalling state.
`boolean` `readFrom(ByteBuffer buf, MessageReader reader)` Reads this message from provided byte buffer.
`boolean` `readThrough()`
`boolean` `skipValues()`
`UUID` `subjectId()`
`int` `taskNameHash()` Gets task name hash.
`AffinityTopologyVersion` `topologyVersion()` Gets topology version or -1 in case of topology version is not required for this message.
`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.GridCacheMessage

`cacheId, cacheId, classError, deployInfo, error, finishUnmarshalCacheObjects, finishUnmarshalCacheObjects, ignoreClassErrors, lookupIndex, marshalCollection, marshalInfo, marshalInfos, marshalInvokeArguments, marshalTx, messageId, nextIndexId, onClassError, partitionExchangeMessage, prepare, prepareMarshalCacheObject, prepareMarshalCacheObjects, prepareMarshalCacheObjects, prepareObject, transferExpiryPolicy, unmarshalCollection, unmarshalInfo, unmarshalInfos, unmarshalInvokeArguments, unmarshalTx`

### 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`

### Field Detail

#### READ_THROUGH_FLAG_MASK

    public static final int READ_THROUGH_FLAG_MASK

See Also:
  Constant Field Values

#### SKIP_VALS_FLAG_MASK

    public static final int SKIP_VALS_FLAG_MASK

See Also:
  Constant Field Values

#### ADD_READER_FLAG_MASK

    public static final int ADD_READER_FLAG_MASK

See Also:
  Constant Field Values

#### NEED_VER_FLAG_MASK

    public static final int NEED_VER_FLAG_MASK

See Also:
  Constant Field Values

#### NEED_ENTRY_INFO_FLAG_MASK

    public static final int NEED_ENTRY_INFO_FLAG_MASK

See Also:
  Constant Field Values

### Constructor Detail

#### GridNearSingleGetRequest

    public GridNearSingleGetRequest()

Empty constructor required for `Message`.

#### GridNearSingleGetRequest

    public GridNearSingleGetRequest(int cacheId,
                            long futId,
                            KeyCacheObject key,
                            boolean readThrough,
                            @NotNull
                            AffinityTopologyVersion topVer,
                            UUID subjId,
                            int taskNameHash,
                            long accessTtl,
                            boolean skipVals,
                            boolean addReader,
                            boolean needVer,
                            boolean addDepInfo)

Parameters:
  `cacheId` - Cache ID.
  `futId` - Future ID.
  `key` - Key.
  `readThrough` - Read through flag.
  `skipVals` - Skip values flag. When false, only boolean values will be returned indicating whether cache entry has a value.
  `topVer` - Topology version.
  `subjId` - Subject ID.
  `taskNameHash` - Task name hash.
  `accessTtl` - New TTL to set after entry is accessed, -1 to leave unchanged.
  `addReader` - Add reader flag.
  `needVer` - `True` if entry version is needed.
  `addDepInfo` - Deployment info.

### Method Detail

#### key

    public KeyCacheObject key()

Returns:
  Key.

#### futureId

    public long futureId()

Returns:
  Future ID.

#### subjectId

    public UUID subjectId()

Returns:
  Subject ID.

#### taskNameHash

    public int taskNameHash()

Gets task name hash.

Returns:
  Task name hash.

#### topologyVersion

    public AffinityTopologyVersion topologyVersion()

Description copied from class: `GridCacheMessage`
Gets topology version or -1 in case of topology version is not required for this message.

Overrides:
  `topologyVersion` in class `GridCacheMessage`
Returns:
  Topology version.

#### accessTtl

    public long accessTtl()

Returns:
  New TTL to set after entry is accessed, -1 to leave unchanged.

#### readThrough

    public boolean readThrough()

Returns:
  Read through flag.

#### skipValues

    public boolean skipValues()

Returns:
  Read through flag.

#### addReader

    public boolean addReader()

Returns:
  Add reader flag.

#### needVersion

    public boolean needVersion()

Returns:
  `True` if entry version is needed.

#### needEntryInfo

    public boolean needEntryInfo()

Returns:
  `True` if full entry information is needed.

#### prepareMarshal

    public void prepareMarshal(GridCacheSharedContext ctx)
                        throws IgniteCheckedException

This method is called before the whole message is serialized and is responsible for pre-marshalling state.

Overrides:
  `prepareMarshal` in class `GridCacheMessage`
Parameters:
  `ctx` - Cache context.
Throws:
  `IgniteCheckedException` - If failed.

#### finishUnmarshal

    public void finishUnmarshal(GridCacheSharedContext 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 `GridCacheMessage`
Parameters:
  `ctx` - Context.
  `ldr` - Class loader.
Throws:
  `IgniteCheckedException` - If failed.

#### readFrom

    public boolean readFrom(ByteBuffer buf,
                   MessageReader reader)

Reads this message from provided byte buffer.

Specified by:
  `readFrom` in interface `Message`
Overrides:
  `readFrom` in class `GridCacheMessage`
Parameters:
  `buf` - Byte buffer.
  `reader` - Reader.
Returns:
  Whether message was fully read.

#### writeTo

    public boolean writeTo(ByteBuffer buf,
                  MessageWriter writer)

Writes this message to provided byte buffer.

Specified by:
  `writeTo` in interface `Message`
Overrides:
  `writeTo` in class `GridCacheMessage`
Parameters:
  `buf` - Byte buffer.
  `writer` - Writer.
Returns:
  Whether message was fully written.

#### addDeploymentInfo

    public boolean addDeploymentInfo()

Deployment enabled flag indicates whether deployment info has to be added to this message.

Specified by:
  `addDeploymentInfo` in class `GridCacheMessage`
Returns:
  `true` or if deployment info must be added to the the message, `false` otherwise.

#### directType

    public byte directType()

Gets message type.

Specified by:
  `directType` in interface `Message`
Returns:
  Message type.

#### fieldsCount

    public byte fieldsCount()

Gets fields count.

Specified by:
  `fieldsCount` in interface `Message`
Returns:
  Fields count.

#### toString

    public String toString()

Overrides:
  `toString` in class `GridCacheMessage`

2015 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.5.0.final
Release Date | : December 29 2015