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

## Class GridDhtTopologyFutureAdapter

- java.lang.Object
- - org.apache.ignite.internal.util.future.GridFutureAdapter<AffinityTopologyVersion>
  - - org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTopologyFutureAdapter

All Implemented Interfaces:
  IgniteInternalFuture<AffinityTopologyVersion>, GridDhtTopologyFuture

Direct Known Subclasses:
  ClientCacheDhtTopologyFuture, GridDhtPartitionsExchangeFuture

    public abstract class GridDhtTopologyFutureAdapter
    extends GridFutureAdapter<AffinityTopologyVersion>
    implements GridDhtTopologyFuture

### Nested Class Summary

Nested Classes
`protected static class` `GridDhtTopologyFutureAdapter.CacheValidation` Cache validation result.

### Field Summary

Fields
`protected Map<Integer,GridDhtTopologyFutureAdapter.CacheValidation>` `grpValidRes` Cache groups validation results.

### Constructor Summary

Constructors
Constructor and Description
`GridDhtTopologyFutureAdapter()`

### Method Summary

Methods
`Throwable` `validateCache(GridCacheContext cctx, boolean recovery, boolean read, Object key, Collection<?> keys)` Returns error is cache topology is not valid.
`protected GridDhtTopologyFutureAdapter.CacheValidation` `validateCacheGroup(CacheGroupContext grp, Collection<ClusterNode> topNodes)`

### 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, 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.processors.cache.distributed.dht.GridDhtTopologyFuture

`topologyVersion`

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

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

### Field Detail

#### grpValidRes

    protected volatile Map<Integer,GridDhtTopologyFutureAdapter.CacheValidation> grpValidRes

Cache groups validation results.

### Constructor Detail

#### GridDhtTopologyFutureAdapter

    public GridDhtTopologyFutureAdapter()

### Method Detail

#### validateCacheGroup

    protected final GridDhtTopologyFutureAdapter.CacheValidation validateCacheGroup(CacheGroupContext grp,
                                                                  Collection<ClusterNode> topNodes)

Parameters:
  `grp` - Cache group.
  `topNodes` - Topology nodes.
Returns:
  Validation result.

#### validateCache

    @Nullable
    public final Throwable validateCache(GridCacheContext cctx,
                                   boolean recovery,
                                   boolean read,
                                   @Nullable
                                   Object key,
                                   @Nullable
                                   Collection<?> keys)

Returns error is cache topology is not valid.

Specified by:
  `validateCache` in interface `GridDhtTopologyFuture`
Parameters:
  `cctx` - Cache context.
  `recovery` - `True` if cache operation is done in recovery mode. Then it will only check for cache active state and topology validator result.
  `read` - `True` if validating read operation, `false` if validating write.
  `key` - Key (optimization to avoid collection creation).
  `keys` - Keys involved in a cache operation.
Returns:
  valid ot not.

2017 Copyright © Apache Software Foundation

Follow @ApacheIgnite

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