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

## Class GridPartitionedSingleGetFuture

- java.lang.Object
- - org.apache.ignite.internal.util.future.GridFutureAdapter<R>
  - - org.apache.ignite.internal.processors.cache.GridCacheFutureAdapter<Object>
    - - org.apache.ignite.internal.processors.cache.distributed.dht.GridPartitionedSingleGetFuture

All Implemented Interfaces:
  IgniteDiagnosticAware, IgniteInternalFuture<Object>, CacheGetFuture, GridCacheFuture<Object>

    public class GridPartitionedSingleGetFuture
    extends GridCacheFutureAdapter<Object>
    implements GridCacheFuture<Object>, CacheGetFuture, IgniteDiagnosticAware

### Constructor Summary

Constructors
Constructor and Description
`GridPartitionedSingleGetFuture(GridCacheContext cctx, KeyCacheObject key, AffinityTopologyVersion topVer, boolean readThrough, boolean forcePrimary, UUID subjId, String taskName, boolean deserializeBinary, IgniteCacheExpiryPolicy expiryPlc, boolean skipVals, boolean canRemap, boolean needVer, boolean keepCacheObjects, boolean recovery)`

### Method Summary

Methods
`void` `addDiagnosticRequest(IgniteDiagnosticPrepareContext ctx)`
`IgniteUuid` `futureId()`
`void` `init()`
`void` `markNotTrackable()` Marks this future as non-trackable.
`boolean` `onDone(Object res, Throwable err)` Callback to notify that future is finished.
`boolean` `onNodeLeft(UUID nodeId)` Callback for when node left.
`void` `onResult(UUID nodeId, GridNearGetResponse res)`
`void` `onResult(UUID nodeId, GridNearSingleGetResponse res)`
`String` `toString()`
`boolean` `trackable()`

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

`duration, onDone, startTime`

### Methods inherited from class org.apache.ignite.internal.util.future.GridFutureAdapter

`cancel, chain, chain, error, get, get, get, getUninterruptibly, ignoreInterrupts, isCancelled, isDone, isFailed, listen, logger, onCancelled, onDone, onDone, onDone, result`

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

`duration, startTime`

### Methods inherited from interface org.apache.ignite.internal.IgniteInternalFuture

`cancel, chain, chain, error, get, get, get, getUninterruptibly, isCancelled, isDone, listen, result`

### Constructor Detail

#### GridPartitionedSingleGetFuture

    public GridPartitionedSingleGetFuture(GridCacheContext cctx,
                                  KeyCacheObject key,
                                  AffinityTopologyVersion topVer,
                                  boolean readThrough,
                                  boolean forcePrimary,
                                  @Nullable
                                  UUID subjId,
                                  String taskName,
                                  boolean deserializeBinary,
                                  @Nullable
                                  IgniteCacheExpiryPolicy expiryPlc,
                                  boolean skipVals,
                                  boolean canRemap,
                                  boolean needVer,
                                  boolean keepCacheObjects,
                                  boolean recovery)

Parameters:
  `cctx` - Context.
  `key` - Key.
  `topVer` - Topology version.
  `readThrough` - Read through flag.
  `forcePrimary` - If `true` then will force network trip to primary node even if called on backup node.
  `subjId` - Subject ID.
  `taskName` - Task name.
  `deserializeBinary` - Deserialize binary flag.
  `expiryPlc` - Expiry policy.
  `skipVals` - Skip values flag.
  `canRemap` - Flag indicating whether future can be remapped on a newer topology version.
  `needVer` - If `true` returns values as tuples containing value and version.
  `keepCacheObjects` - Keep cache objects flag.

### Method Detail

#### init

    public void init()

#### onResult

    public void onResult(UUID nodeId,
                GridNearSingleGetResponse res)

Parameters:
  `nodeId` - Node ID.
  `res` - Result.

#### onResult

    public void onResult(UUID nodeId,
                GridNearGetResponse res)

Specified by:
  `onResult` in interface `CacheGetFuture`
Parameters:
  `nodeId` - Node ID.
  `res` - Result.

#### futureId

    public IgniteUuid futureId()

Specified by:
  `futureId` in interface `GridCacheFuture<Object>`
Returns:
  Unique identifier for this future.

#### onNodeLeft

    public boolean onNodeLeft(UUID nodeId)

Callback for when node left.

Specified by:
  `onNodeLeft` in interface `GridCacheFuture<Object>`
Parameters:
  `nodeId` - Left node ID.
Returns:
  `True` if future cared about this node.

#### onDone

    public boolean onDone(Object res,
                 Throwable err)

Callback to notify that future is finished. Note that if non-`null` exception is passed in the result value will be ignored.

Overrides:
  `onDone` in class `GridFutureAdapter<Object>`
Parameters:
  `res` - Optional result.
  `err` - Optional error.
Returns:
  `True` if result was set by this call.

#### trackable

    public boolean trackable()

Specified by:
  `trackable` in interface `GridCacheFuture<Object>`
Returns:
  `True` if future should be tracked.

#### markNotTrackable

    public void markNotTrackable()

Marks this future as non-trackable.

Specified by:
  `markNotTrackable` in interface `GridCacheFuture<Object>`

#### addDiagnosticRequest

    public void addDiagnosticRequest(IgniteDiagnosticPrepareContext ctx)

Specified by:
  `addDiagnosticRequest` in interface `IgniteDiagnosticAware`
Parameters:
  `ctx` - Context.

#### toString

    public String toString()

Overrides:
  `toString` in class `GridFutureAdapter<Object>`

2017 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 2.1.0
Release Date | : July 20 2017