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

## Interface GridDhtTopologyFuture

All Superinterfaces:
  IgniteInternalFuture<AffinityTopologyVersion>

All Known Implementing Classes:
  ClientCacheDhtTopologyFuture, GridDhtPartitionsExchangeFuture, GridDhtTopologyFutureAdapter

    public interface GridDhtTopologyFuture
    extends IgniteInternalFuture<AffinityTopologyVersion>

Future that implements a barrier after which dht topology is safe to use. Topology is considered to be safe to use when all transactions that involve moving primary partitions are completed and partition map exchange is also completed.

When new new transaction is started, it will wait for this future before acquiring new locks on particular topology version.

### Method Summary

Methods
`AffinityTopologyVersion` `topologyVersion()` Gets topology version of this future.
`Throwable` `validateCache(GridCacheContext cctx, boolean recovery, boolean read, Object key, Collection<?> keys)` Returns error is cache topology is not valid.

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

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

### Method Detail

#### topologyVersion

    AffinityTopologyVersion topologyVersion()

Gets topology version of this future.

Returns:
  Topology version.

#### validateCache

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

Returns error is cache topology is not valid.

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