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

## Class GridDhtGetSingleFuture<K,V>

- java.lang.Object
- - org.apache.ignite.internal.util.future.GridFutureAdapter<GridCacheEntryInfo>
  - - org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtGetSingleFuture<K,V>

All Implemented Interfaces:
  IgniteInternalFuture<GridCacheEntryInfo>, GridDhtFuture<GridCacheEntryInfo>

    public final class GridDhtGetSingleFuture<K,V>
    extends GridFutureAdapter<GridCacheEntryInfo>
    implements GridDhtFuture<GridCacheEntryInfo>

### Constructor Summary

Constructors
Constructor and Description
`GridDhtGetSingleFuture(GridCacheContext<K,V> cctx, long msgId, UUID reader, KeyCacheObject key, boolean addRdr, boolean readThrough, @NotNull AffinityTopologyVersion topVer, @Nullable UUID subjId, int taskNameHash, @Nullable IgniteCacheExpiryPolicy expiryPlc, boolean skipVals, boolean recovery, @Nullable String txLbl, @Nullable MvccSnapshot mvccSnapshot)`

### Method Summary

All Methods Instance Methods Concrete Methods
`IgniteUuid` `futureId()`
`Collection<Integer>` `invalidPartitions()` Node that future should be able to provide keys to retry before it completes, so it's not necessary to wait till future is done to get retry keys.
`boolean` `onDone(GridCacheEntryInfo res, Throwable err)` Callback to notify that future is finished.
`GridCacheVersion` `version()`

### 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, onDone, reset, result, toString`

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

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

### Constructor Detail

#### GridDhtGetSingleFuture

    public GridDhtGetSingleFuture(GridCacheContext<K,V> cctx,
                                  long msgId,
                                  UUID reader,
                                  KeyCacheObject key,
                                  boolean addRdr,
                                  boolean readThrough,
                                  @NotNull
                                  @NotNull AffinityTopologyVersion topVer,
                                  @Nullable
                                  @Nullable UUID subjId,
                                  int taskNameHash,
                                  @Nullable
                                  @Nullable IgniteCacheExpiryPolicy expiryPlc,
                                  boolean skipVals,
                                  boolean recovery,
                                  @Nullable
                                  @Nullable String txLbl,
                                  @Nullable
                                  @Nullable MvccSnapshot mvccSnapshot)

Parameters:
  `cctx` - Context.
  `msgId` - Message ID.
  `reader` - Reader.
  `key` - Key.
  `addRdr` - Add reader flag.
  `readThrough` - Read through flag.
  `topVer` - Topology version.
  `subjId` - Subject ID.
  `taskNameHash` - Task name hash code.
  `expiryPlc` - Expiry policy.
  `skipVals` - Skip values flag.
  `txLbl` - Transaction label.
  `mvccSnapshot` - Mvcc snapshot.

### Method Detail

#### futureId

    public IgniteUuid futureId()

Returns:
  Future ID.

#### version

    public GridCacheVersion version()

Returns:
  Future version.

#### onDone

    public boolean onDone(GridCacheEntryInfo 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<GridCacheEntryInfo>`
Parameters:
  `res` - Optional result.
  `err` - Optional error.
Returns:
  `True` if result was set by this call.

#### invalidPartitions

    public Collection<Integer> invalidPartitions()

Node that future should be able to provide keys to retry before it completes, so it's not necessary to wait till future is done to get retry keys.

Specified by:
  `invalidPartitions` in interface `GridDhtFuture<GridCacheEntryInfo>`
Returns:
  Keys to retry because this node is no longer a primary or backup.

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.8.0
Release Date | : February 27 2020