/** {@inheritDoc} */ @Override public GridCachePreloader preloader() { return ctx.group().preloader(); }
/** * Destroys partition data store and invokes appropriate callbacks. */ public void destroy() { assert state() == EVICTED : this; assert evictGuard.get() == -1; grp.onPartitionEvicted(id); destroyCacheDataStore(); rent.onDone(); ((GridDhtPreloader)grp.preloader()).onPartitionEvicted(this, updateSeqOnDestroy); clearDeferredDeletes(); }
/** * @param cancelled Is cancelled. */ private void checkIsDone(boolean cancelled) { if (remaining.isEmpty()) { sendRebalanceFinishedEvent(); if (log.isInfoEnabled()) log.info("Completed rebalance future: " + this); if (log.isDebugEnabled()) log.debug("Partitions have been scheduled to resend [reason=" + "Rebalance is done [grp=" + grp.cacheOrGroupName() + "]"); ctx.exchange().scheduleResendPartitions(); Collection<Integer> m = new HashSet<>(); for (Map.Entry<UUID, Collection<Integer>> e : missed.entrySet()) { if (e.getValue() != null && !e.getValue().isEmpty()) m.addAll(e.getValue()); } if (!m.isEmpty()) { U.log(log, ("Reassigning partitions that were missed: " + m)); onDone(false); //Finished but has missed partitions, will force dummy exchange ctx.exchange().forceReassign(exchId); return; } if (!cancelled && !grp.preloader().syncFuture().isDone()) ((GridFutureAdapter)grp.preloader().syncFuture()).onDone(); onDone(!cancelled); } }
/** * */ private void onLeft() { for (CacheGroupContext grp : cctx.cache().cacheGroups()) { if (grp.isLocal()) continue; grp.preloader().unwindUndeploys(); cctx.exchange().exchangerUpdateHeartbeat(); } }
/** * @param keysMap Keys to request. * @return Keys request future. */ private IgniteInternalFuture<Object> forceRebalanceKeys(Map<Integer, Collection<KeyCacheObject>> keysMap) { if (F.isEmpty(keysMap)) return null; GridCompoundFuture<Object, Object> compFut = null; IgniteInternalFuture<Object> lastForceFut = null; for (Map.Entry<Integer, Collection<KeyCacheObject>> entry : keysMap.entrySet()) { if (lastForceFut != null && compFut == null) { compFut = new GridCompoundFuture(); compFut.add(lastForceFut); } int cacheId = entry.getKey(); Collection<KeyCacheObject> keys = entry.getValue(); GridCacheContext ctx = cctx.cacheContext(cacheId); lastForceFut = ctx.group().preloader().request(ctx, keys, tx.topologyVersion()); if (compFut != null && lastForceFut != null) compFut.add(lastForceFut); } if (compFut != null) { compFut.markInitialized(); return compFut; } else return lastForceFut; }
GridDhtFuture<Object> fut = cctx.group().preloader().request(cctx, keys.keySet(), topVer);
task.part().group().preloader().rebalanceFuture().listen(f -> cleanupQueue.add(task));
final UpdateReplyClosure completionCb ) { IgniteInternalFuture<Object> forceFut = ctx.group().preloader().request(ctx, req, req.topologyVersion());
GridCachePreloader preloader = grp.preloader();
ctx.group().preloader().request(ctx, req.keys(), req.topologyVersion());
continue; GridCachePreloader preloader = grp.preloader();
((GridFutureAdapter)grp.preloader().syncFuture()).onDone();
assert keys != null; IgniteInternalFuture<Object> keyFut = ctx.group().preloader().request(cacheCtx, keys, topVer);
grp.preloader().onTopologyChanged(this);
grp.preloader().onInitialExchangeComplete(null);
final GridCachePreloader preloader = demanderNode.cachex(CACHE_NAME).context().group().preloader();
/** * Destroys partition data store and invokes appropriate callbacks. */ public void destroy() { assert state() == EVICTED : this; assert evictGuard.get() == -1; grp.onPartitionEvicted(id); destroyCacheDataStore(); rent.onDone(); ((GridDhtPreloader)grp.preloader()).onPartitionEvicted(this, updateSeqOnDestroy); clearDeferredDeletes(); }
/** * */ private void onLeft() { for (CacheGroupContext grp : cctx.cache().cacheGroups()) { if (grp.isLocal()) continue; grp.preloader().unwindUndeploys(); cctx.exchange().exchangerUpdateHeartbeat(); } cctx.mvcc().removeExplicitNodeLocks(exchId.nodeId(), exchId.topologyVersion()); }