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

## Class GridNearGetResponse

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

All Implemented Interfaces:
  Serializable, GridCacheDeployable, GridCacheVersionable, Message

    public class GridNearGetResponse
    extends GridCacheMessage
    implements GridCacheDeployable, GridCacheVersionable

Get response.

See Also:
  Serialized Form

### Field Summary

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

`CACHE_MSG_INDEX_FIELD_NAME, cacheId, MAX_CACHE_MSG_LOOKUP_INDEX`

### Constructor Summary

Constructors
Constructor and Description
`GridNearGetResponse()` Empty constructor required for `Externalizable`.
`GridNearGetResponse(int cacheId, IgniteUuid futId, IgniteUuid miniId, GridCacheVersion ver)`

### Method Summary

Methods
`byte` `directType()` Gets message type.
`Collection<GridCacheEntryInfo>` `entries()`
`void` `entries(Collection<GridCacheEntryInfo> entries)`
`IgniteCheckedException` `error()`
`void` `error(IgniteCheckedException err)`
`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.
`IgniteUuid` `futureId()`
`Collection<Integer>` `invalidPartitions()`
`void` `invalidPartitions(Collection<Integer> invalidParts, AffinityTopologyVersion topVer)`
`IgniteUuid` `miniId()`
`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.
`AffinityTopologyVersion` `topologyVersion()` Gets topology version or -1 in case of topology version is not required for this message.
`String` `toString()`
`GridCacheVersion` `version()`
`boolean` `writeTo(ByteBuffer buf, MessageWriter writer)` Writes this message to provided byte buffer.

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

`allowForStartup, cacheId, cacheId, classError, deployInfo, finishUnmarshalCacheObjects, finishUnmarshalCacheObjects, ignoreClassErrors, lookupIndex, marshalCollection, marshalInfo, marshalInfos, marshalInvokeArguments, marshalTx, messageId, nextIndexId, onClassError, partitionExchangeMessage, prepare, 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`

### Constructor Detail

#### GridNearGetResponse

    public GridNearGetResponse()

Empty constructor required for `Externalizable`.

#### GridNearGetResponse

    public GridNearGetResponse(int cacheId,
                       IgniteUuid futId,
                       IgniteUuid miniId,
                       GridCacheVersion ver)

Parameters:
  `cacheId` - Cache ID.
  `futId` - Future ID.
  `miniId` - Sub ID.
  `ver` - Version.

### Method Detail

#### futureId

    public IgniteUuid futureId()

Returns:
  Future ID.

#### miniId

    public IgniteUuid miniId()

Returns:
  Sub ID.

#### version

    public GridCacheVersion version()

Specified by:
  `version` in interface `GridCacheVersionable`
Returns:
  Version.

#### entries

    public Collection<GridCacheEntryInfo> entries()

Returns:
  Entries.

#### entries

    public void entries(Collection<GridCacheEntryInfo> entries)

Parameters:
  `entries` - Entries.

#### invalidPartitions

    public Collection<Integer> invalidPartitions()

Returns:
  Failed filter set.

#### invalidPartitions

    public void invalidPartitions(Collection<Integer> invalidParts,
                         @NotNull
                         AffinityTopologyVersion topVer)

Parameters:
  `invalidParts` - Partitions to retry due to ownership shift.
  `topVer` - Topology version.

#### 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 if this response has invalid partitions.

#### error

    public IgniteCheckedException error()

Returns:
  Error.

#### error

    public void error(IgniteCheckedException err)

Parameters:
  `err` - Error.

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

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

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

#### 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.2.0-incubating
Release Date | : June 16 2015