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

## Class GridNearReadRepairAbstractFuture

- java.lang.Object
- - org.apache.ignite.internal.util.future.GridFutureAdapter<Map<KeyCacheObject,EntryGetResult>>
  - - org.apache.ignite.internal.processors.cache.distributed.near.consistency.GridNearReadRepairAbstractFuture

All Implemented Interfaces:
  IgniteInternalFuture<Map<KeyCacheObject,EntryGetResult>>

Direct Known Subclasses:
  GridNearReadRepairCheckOnlyFuture, GridNearReadRepairFuture

    public abstract class GridNearReadRepairAbstractFuture
    extends GridFutureAdapter<Map<KeyCacheObject,EntryGetResult>>

### Field Summary

Fields
`protected GridCacheContext<KeyCacheObject,EntryGetResult>` `ctx` Context.
`protected boolean` `deserializeBinary` Deserialize binary flag.
`static int` `DFLT_MAX_REMAP_CNT` Default max remap count value.
`protected IgniteCacheExpiryPolicy` `expiryPlc` Expiry policy flag.
`protected Map<ClusterNode,GridPartitionedGetFuture<KeyCacheObject,EntryGetResult>>` `futs` Affinity node's get futures.
`protected Collection<KeyCacheObject>` `keys` Context.
`protected static int` `MAX_REMAP_CNT` Maximum number of attempts to remap key to the same primary node.
`protected boolean` `readThrough` Read through flag.
`protected boolean` `recovery` Recovery flag.
`protected static AtomicIntegerFieldUpdater<GridNearReadRepairAbstractFuture>` `REMAP_CNT_UPD` Remap count updater.
`protected int` `remapCnt` Remap count.
`protected String` `taskName` Task name.
`protected IgniteInternalTx` `tx` Tx.

### Constructor Summary

Constructors
`protected` `GridNearReadRepairAbstractFuture(AffinityTopologyVersion topVer, GridCacheContext<KeyCacheObject,EntryGetResult> ctx, Collection<KeyCacheObject> keys, boolean readThrough, String taskName, boolean deserializeBinary, boolean recovery, IgniteCacheExpiryPolicy expiryPlc, IgniteInternalTx tx)` Creates a new instance of GridNearReadRepairAbstractFuture.

### Method Summary

All Methods Instance Methods Abstract Methods Concrete Methods
`protected void` `map(AffinityTopologyVersion topVer)`
`protected void` `onResult(IgniteInternalFuture<Map<KeyCacheObject,EntryGetResult>> finished)` Collects results of each 'get' future and prepares an overall result of the operation.
`protected abstract void` `reduce()` Reduces fut's results.

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

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Field Detail

#### DFLT_MAX_REMAP_CNT

    public static final int DFLT_MAX_REMAP_CNT

Default max remap count value.

See Also:
  Constant Field Values

#### MAX_REMAP_CNT

    protected static final int MAX_REMAP_CNT

Maximum number of attempts to remap key to the same primary node.

#### REMAP_CNT_UPD

    protected static final AtomicIntegerFieldUpdater<GridNearReadRepairAbstractFuture> REMAP_CNT_UPD

Remap count updater.

#### remapCnt

    protected volatile int remapCnt

Remap count.

#### futs

    protected final Map<ClusterNode,GridPartitionedGetFuture<KeyCacheObject,EntryGetResult>> futs

Affinity node's get futures.

#### ctx

    protected final GridCacheContext<KeyCacheObject,EntryGetResult> ctx

Context.

#### keys

    protected final Collection<KeyCacheObject> keys

Context.

#### readThrough

    protected final boolean readThrough

Read through flag.

#### taskName

    protected final String taskName

Task name.

#### deserializeBinary

    protected final boolean deserializeBinary

Deserialize binary flag.

#### recovery

    protected final boolean recovery

Recovery flag.

#### expiryPlc

    protected final IgniteCacheExpiryPolicy expiryPlc

Expiry policy flag.

#### tx

    protected final IgniteInternalTx tx

Tx.

### Constructor Detail

#### GridNearReadRepairAbstractFuture

    protected GridNearReadRepairAbstractFuture(AffinityTopologyVersion topVer,
                                               GridCacheContext<KeyCacheObject,EntryGetResult> ctx,
                                               Collection<KeyCacheObject> keys,
                                               boolean readThrough,
                                               String taskName,
                                               boolean deserializeBinary,
                                               boolean recovery,
                                               IgniteCacheExpiryPolicy expiryPlc,
                                               IgniteInternalTx tx)

Creates a new instance of GridNearReadRepairAbstractFuture.

Parameters:
  `topVer` - Topology version.
  `ctx` - Cache context.
  `keys` - Keys.
  `readThrough` - Read-through flag.
  `taskName` - Task name.
  `deserializeBinary` - Deserialize binary flag.
  `recovery` - Partition recovery flag.
  `expiryPlc` - Expiry policy.
  `tx` - Transaction. Can be `null` in case of atomic cache.

### Method Detail

#### map

    protected void map(AffinityTopologyVersion topVer)

Parameters:
  `topVer` - Affinity topology version.

#### onResult

    protected void onResult(IgniteInternalFuture<Map<KeyCacheObject,EntryGetResult>> finished)

Collects results of each 'get' future and prepares an overall result of the operation.

Parameters:
  `finished` - Future represents a result of GET operation.

#### reduce

    protected abstract void reduce()

Reduces fut's results.

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.9.0
Release Date | : October 15 2020