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:
GridDhtPartitionsExchangeFuture
public abstract class GridDhtTopologyFutureAdapter extends GridFutureAdapter<AffinityTopologyVersion> implements GridDhtTopologyFuture
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classGridDhtTopologyFutureAdapter.CacheGroupValidationCache group validation result.
-
Field Summary
Fields Modifier and Type Field Description protected booleanclusterIsActiveWhether or not cluster is active.protected Map<Integer,GridDhtTopologyFutureAdapter.CacheGroupValidation>grpValidResCache groups validation results.
-
Constructor Summary
Constructors Constructor Description GridDhtTopologyFutureAdapter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanhasLostPartitions()@Nullable CacheInvalidStateExceptionvalidateCache(GridCacheContext cctx, boolean recovery, boolean read, @Nullable Object key, @Nullable Collection<?> keys)Returns error is cache topology is not valid.protected GridDhtTopologyFutureAdapter.CacheGroupValidationvalidateCacheGroup(CacheGroupContext grp, Collection<ClusterNode> topNodes)-
Methods inherited from class org.apache.ignite.internal.util.future.GridFutureAdapter
cancel, chain, chain, chain, chain, chainCompose, chainCompose, error, get, get, get, getUninterruptibly, ignoreInterrupts, isCancelled, isDone, isFailed, listen, 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
-
Methods inherited from interface org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTopologyFuture
changedAffinity, exchangeDone, initialVersion, topologyVersion
-
Methods inherited from interface org.apache.ignite.internal.IgniteInternalFuture
cancel, chain, chain, chain, chain, chainCompose, chainCompose, error, get, get, get, getUninterruptibly, isCancelled, isDone, listen, listen, result
-
-
-
-
Field Detail
-
grpValidRes
protected volatile Map<Integer,GridDhtTopologyFutureAdapter.CacheGroupValidation> grpValidRes
Cache groups validation results.
-
clusterIsActive
protected volatile boolean clusterIsActive
Whether or not cluster is active.
-
-
Method Detail
-
validateCacheGroup
protected final GridDhtTopologyFutureAdapter.CacheGroupValidation validateCacheGroup(CacheGroupContext grp, Collection<ClusterNode> topNodes)
- Parameters:
grp- Cache group.topNodes- Topology nodes.- Returns:
- Validation result.
-
validateCache
@Nullable public final @Nullable CacheInvalidStateException validateCache(GridCacheContext cctx, boolean recovery, boolean read, @Nullable @Nullable Object key, @Nullable @Nullable Collection<?> keys)
Returns error is cache topology is not valid.- Specified by:
validateCachein interfaceGridDhtTopologyFuture- Parameters:
cctx- Cache context.recovery-Trueif cache operation is done in recovery mode. Then it will only check for cache active state and topology validator result.read-Trueif validating read operation,falseif validating write.key- Key (optimization to avoid collection creation).keys- Keys involved in a cache operation.- Returns:
- Not null exception if a cache is in invalid state.
-
hasLostPartitions
public boolean hasLostPartitions()
- Returns:
trueIf any lost partitions was detected.
-
-