public class GridDhtPartitionsExchangeFuture extends GridFutureAdapter<AffinityTopologyVersion> implements Comparable<GridDhtPartitionsExchangeFuture>, GridDhtTopologyFuture, CachePartitionExchangeWorkerTask
| Modifier and Type | Field and Description |
|---|---|
static int |
DUMP_PENDING_OBJECTS_THRESHOLD |
| Constructor and Description |
|---|
GridDhtPartitionsExchangeFuture(GridCacheSharedContext cctx,
boolean reassign,
DiscoveryEvent discoEvt,
GridDhtPartitionExchangeId exchId)
Dummy future created to trigger reassignments if partition
topology changed while preloading.
|
GridDhtPartitionsExchangeFuture(GridCacheSharedContext cctx,
DiscoveryEvent discoEvt,
GridDhtPartitionExchangeId exchId,
GridFutureAdapter<Boolean> forcedRebFut)
Force preload future created to trigger reassignments if partition
topology changed while preloading.
|
GridDhtPartitionsExchangeFuture(GridCacheSharedContext cctx,
ReadWriteLock busyLock,
GridDhtPartitionExchangeId exchId,
Collection<DynamicCacheChangeRequest> reqs,
CacheAffinityChangeMessage affChangeMsg) |
cancel, chain, chain, error, get, get, get, getUninterruptibly, ignoreInterrupts, isCancelled, isDone, isFailed, listen, logger, onCancelled, onDone, onDone, onDone, onDone, resultclone, finalize, getClass, notify, notifyAll, wait, wait, waitcancel, chain, chain, error, get, get, get, getUninterruptibly, isCancelled, isDone, listen, resultpublic GridDhtPartitionsExchangeFuture(GridCacheSharedContext cctx, boolean reassign, DiscoveryEvent discoEvt, GridDhtPartitionExchangeId exchId)
cctx - Cache context.reassign - Dummy reassign flag.discoEvt - Discovery event.exchId - Exchange id.public GridDhtPartitionsExchangeFuture(GridCacheSharedContext cctx, DiscoveryEvent discoEvt, GridDhtPartitionExchangeId exchId, GridFutureAdapter<Boolean> forcedRebFut)
cctx - Cache context.discoEvt - Discovery event.exchId - Exchange id.forcedRebFut - Forced Rebalance future.public GridDhtPartitionsExchangeFuture(GridCacheSharedContext cctx, ReadWriteLock busyLock, GridDhtPartitionExchangeId exchId, Collection<DynamicCacheChangeRequest> reqs, CacheAffinityChangeMessage affChangeMsg)
cctx - Cache context.busyLock - Busy lock.exchId - Exchange ID.reqs - Cache change requests.affChangeMsg - Affinity change message.public void cacheChangeRequests(Collection<DynamicCacheChangeRequest> reqs)
reqs - Cache change requests.public void affinityChangeMessage(CacheAffinityChangeMessage affChangeMsg)
affChangeMsg - Affinity change message.public AffinityTopologyVersion topologyVersion()
topologyVersion in interface GridDhtTopologyFuturepublic boolean skipPreload()
public boolean dummy()
public boolean forcePreload()
public boolean reassign()
public boolean dummyReassign()
True if dummy reassign.public DiscoCache discoCache()
public boolean isCacheAdded(int cacheId,
AffinityTopologyVersion topVer)
cacheId - Cache ID to check.topVer - Topology version.True if cache was added during this exchange.public boolean cacheStarted(int cacheId)
cacheId - Cache ID.True if non-client cache was added during this exchange.public boolean onAdded()
Truepublic void onEvent(GridDhtPartitionExchangeId exchId, DiscoveryEvent discoEvt, DiscoCache discoCache)
exchId - Exchange ID.discoEvt - Discovery event.discoCache - Discovery data cache.public ClusterState newClusterState()
public DiscoveryEvent discoveryEvent()
public GridDhtPartitionExchangeId exchangeId()
@Nullable public GridFutureAdapter<Boolean> forcedRebalanceFuture()
public void init()
throws IgniteInterruptedCheckedException
IgniteInterruptedCheckedException - If interrupted.public boolean stopping(int cacheId)
cacheId - Cache ID to check.True if cache is stopping by this exchange.public boolean onDone(@Nullable
AffinityTopologyVersion res,
@Nullable
Throwable err)
null exception is passed in
the result value will be ignored.onDone in class GridFutureAdapter<AffinityTopologyVersion>res - Optional result.err - Optional error.True if result was set by this call.@Nullable public Throwable validateCache(GridCacheContext cctx, boolean recovery, boolean read, @Nullable Object key, @Nullable Collection<?> keys)
validateCache in interface GridDhtTopologyFuturecctx - 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.public void cleanUp()
public void onReceive(ClusterNode node, GridDhtPartitionsSingleMessage msg)
node - Sender node.msg - Single partition info.public void onReceive(ClusterNode node, GridDhtPartitionsFullMessage msg)
node - Sender node.msg - Full partition info.public void onAffinityChangeMessage(ClusterNode node, CacheAffinityChangeMessage msg)
onNodeLeft(org.apache.ignite.cluster.ClusterNode).node - Message sender node.msg - Message.public void onNodeLeft(ClusterNode node)
onAffinityChangeMessage(org.apache.ignite.cluster.ClusterNode, org.apache.ignite.internal.processors.cache.CacheAffinityChangeMessage).node - Left node.public boolean reconnectOnError(Throwable e)
e - Exception.True if local node should try reconnect in case of error.public int compareTo(GridDhtPartitionsExchangeFuture fut)
compareTo in interface Comparable<GridDhtPartitionsExchangeFuture>public String toString()
toString in class GridFutureAdapter<AffinityTopologyVersion>
Follow @ApacheIgnite
Ignite Fabric : ver. 2.0.0 Release Date : April 30 2017