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

## Class GridNearGetFuture<K,V>

- java.lang.Object
- - org.apache.ignite.internal.util.future.GridFutureAdapter<R>
  - - org.apache.ignite.internal.util.future.GridCompoundFuture<T,T>
    - - org.apache.ignite.internal.util.future.GridCompoundIdentityFuture<T>
      - - org.apache.ignite.internal.processors.cache.GridCacheCompoundIdentityFuture<Map<K,V>>
        - - org.apache.ignite.internal.processors.cache.distributed.dht.CacheDistributedGetFutureAdapter<K,V>
          - - org.apache.ignite.internal.processors.cache.distributed.near.GridNearGetFuture<K,V>

All Implemented Interfaces:
  Serializable, IgniteInternalFuture<Map<K,V>>, CacheGetFuture, GridCacheFuture<Map<K,V>>, IgniteInClosure<IgniteInternalFuture<Map<K,V>>>

    public final class GridNearGetFuture<K,V>
    extends CacheDistributedGetFutureAdapter<K,V>

See Also:
  Serialized Form

### Nested Class Summary

### Nested classes/interfaces inherited from class org.apache.ignite.internal.processors.cache.distributed.dht.CacheDistributedGetFutureAdapter

`CacheDistributedGetFutureAdapter.AbstractMiniFuture`

### Field Summary

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

`canRemap, cctx, deploymentLdrId, deserializeBinary, DFLT_MAX_REMAP_CNT, expiryPlc, forcePrimary, futId, invalidNodes, keepCacheObjects, keys, log, logRef, MAX_REMAP_CNT, needVer, readThrough, recovery, REMAP_CNT_UPD, remapCnt, skipVals, subjId, taskName, trackable`

### Constructor Summary

Constructors
Constructor and Description
`GridNearGetFuture(GridCacheContext<K,V> cctx, Collection<KeyCacheObject> keys, boolean readThrough, boolean forcePrimary, @Nullable IgniteTxLocalEx tx, @Nullable UUID subjId, String taskName, boolean deserializeBinary, @Nullable IgniteCacheExpiryPolicy expiryPlc, boolean skipVals, boolean needVer, boolean keepCacheObjects, boolean recovery)`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `init(@Nullable AffinityTopologyVersion topVer)` Initializes future.
`protected boolean` `isMini(IgniteInternalFuture<?> f)`
`protected void` `map(Collection<KeyCacheObject> keys, Map<ClusterNode,LinkedHashMap<KeyCacheObject,Boolean>> mapped, AffinityTopologyVersion topVer)`
`boolean` `onDone(Map<K,V> res, Throwable err)` Callback to notify that future is finished.
`String` `toString()`

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

`addNodeAsInvalid, checkRetryPermits, futureId, getInvalidNodes, initLogger, markNotTrackable, onNodeLeft, onResult, partitionOwned, registrateFutureInMvccManager, serverNotFoundError, trackable`

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

`duration, onDone, startTime`

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

`add, apply, cancel, clear, future, futures, futuresCountNoLock, hasFutures, hasPending, ignoreFailure, initialized, logDebug, logError, markInitialized, processFailure`

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

`chain, chain, error, get, get, get, getUninterruptibly, ignoreInterrupts, isCancelled, isDone, isFailed, listen, logger, onCancelled, onDone, onDone, onDone, reset, 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.IgniteInternalFuture

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

### Constructor Detail

#### GridNearGetFuture

    public GridNearGetFuture(GridCacheContext<K,V> cctx,
                             Collection<KeyCacheObject> keys,
                             boolean readThrough,
                             boolean forcePrimary,
                             @Nullable
                             @Nullable IgniteTxLocalEx tx,
                             @Nullable
                             @Nullable UUID subjId,
                             String taskName,
                             boolean deserializeBinary,
                             @Nullable
                             @Nullable IgniteCacheExpiryPolicy expiryPlc,
                             boolean skipVals,
                             boolean needVer,
                             boolean keepCacheObjects,
                             boolean recovery)

Parameters:
  `cctx` - Context.
  `keys` - Keys.
  `readThrough` - Read through flag.
  `forcePrimary` - If `true` get will be performed on primary node even if called on backup node.
  `tx` - Transaction.
  `subjId` - Subject ID.
  `taskName` - Task name.
  `deserializeBinary` - Deserialize binary flag.
  `expiryPlc` - Expiry policy.
  `skipVals` - Skip values flag.
  `needVer` - If `true` returns values as tuples containing value and version.
  `keepCacheObjects` - Keep cache objects flag.

### Method Detail

#### init

    public void init(@Nullable
                     @Nullable AffinityTopologyVersion topVer)

Initializes future.

Parameters:
  `topVer` - Topology version.

#### onDone

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

#### isMini

    protected boolean isMini(IgniteInternalFuture<?> f)

Specified by:
  `isMini` in class `CacheDistributedGetFutureAdapter<K,V>`
Parameters:
  `f` - Future.
Returns:
  `True` if mini-future.

#### map

    protected void map(Collection<KeyCacheObject> keys,
                       Map<ClusterNode,LinkedHashMap<KeyCacheObject,Boolean>> mapped,
                       AffinityTopologyVersion topVer)

Specified by:
  `map` in class `CacheDistributedGetFutureAdapter<K,V>`
Parameters:
  `keys` - Keys.
  `mapped` - Mappings to check for duplicates.
  `topVer` - Topology version to map on.

#### toString

    public String toString()

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

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.11.0
Release Date | : September 11 2021