public class GridDhtPreloader extends GridCachePreloaderAdapter
| Modifier and Type | Field and Description |
|---|---|
static long |
DFLT_PRELOAD_RESEND_TIMEOUT
Default preload resend timeout.
|
ctx, grp, log, preloadPred| Constructor and Description |
|---|
GridDhtPreloader(CacheGroupContext grp) |
preloadPredicatepublic static final long DFLT_PRELOAD_RESEND_TIMEOUT
public GridDhtPreloader(CacheGroupContext grp)
grp - Cache group.public void start()
start in interface GridCachePreloaderstart in class GridCachePreloaderAdapterpublic void preloadPredicate(IgnitePredicate<GridCacheEntryInfo> preloadPred)
preloadPredicate in interface GridCachePreloaderpreloadPredicate in class GridCachePreloaderAdapterpreloadPred - Preload predicate.public void onKernalStop()
onKernalStop in interface GridCachePreloaderonKernalStop in class GridCachePreloaderAdapterpublic void onInitialExchangeComplete(@Nullable
Throwable err)
onInitialExchangeComplete in interface GridCachePreloaderonInitialExchangeComplete in class GridCachePreloaderAdaptererr - Error, if any happened on initial exchange.public void onTopologyChanged(GridDhtPartitionsExchangeFuture lastFut)
onTopologyChanged in interface GridCachePreloaderonTopologyChanged in class GridCachePreloaderAdapterlastFut - Last future.public boolean rebalanceRequired(AffinityTopologyVersion rebTopVer, GridDhtPartitionsExchangeFuture exchFut)
rebalanceRequired in interface GridCachePreloaderrebalanceRequired in class GridCachePreloaderAdapterrebTopVer - Previous rebalance topology version or NONE if there is no info.exchFut - Completed exchange future.True if rebalance should be started (previous will be interrupted).public GridDhtPreloaderAssignments generateAssignments(GridDhtPartitionExchangeId exchId, GridDhtPartitionsExchangeFuture exchFut)
generateAssignments in interface GridCachePreloadergenerateAssignments in class GridCachePreloaderAdapterexchId - Exchange ID.exchFut - Completed exchange future. Can be null if forced or reassigned generation occurs.public void onReconnected()
onReconnected in interface GridCachePreloaderonReconnected in class GridCachePreloaderAdapterpublic void handleSupplyMessage(int idx,
UUID id,
GridDhtPartitionSupplyMessage s)
handleSupplyMessage in interface GridCachePreloaderhandleSupplyMessage in class GridCachePreloaderAdapteridx - Index.id - Node Id.s - Supply message.public void handleDemandMessage(int idx,
UUID id,
GridDhtPartitionDemandMessage d)
handleDemandMessage in interface GridCachePreloaderhandleDemandMessage in class GridCachePreloaderAdapteridx - Index.id - Node Id.d - Demand message.public Runnable addAssignments(GridDhtPreloaderAssignments assignments, boolean forceRebalance, long rebalanceId, Runnable next, @Nullable GridCompoundFuture<Boolean,Boolean> forcedRebFut)
addAssignments in interface GridCachePreloaderaddAssignments in class GridCachePreloaderAdapterassignments - Assignments to add.forceRebalance - True if preload requested by ForceRebalanceExchangeTask.rebalanceId - Rebalance id created by exchange thread.next - Runnable responsible for cache rebalancing chain.forcedRebFut - External future for forced rebalance.public IgniteInternalFuture<Object> startFuture()
GridCachePreloaderAdapterstartFuture in interface GridCachePreloaderstartFuture in class GridCachePreloaderAdapterpublic IgniteInternalFuture<?> syncFuture()
syncFuture in interface GridCachePreloadersyncFuture in class GridCachePreloaderAdapterpublic IgniteInternalFuture<Boolean> rebalanceFuture()
rebalanceFuture in interface GridCachePreloaderrebalanceFuture in class GridCachePreloaderAdaptertrue in case rebalancing successfully finished at current topology.
Future result is false in case rebalancing cancelled or finished with missed partitions and will be
restarted at current or pending topology.public void onPartitionEvicted(GridDhtLocalPartition part, boolean updateSeq)
part - Evicted partition.updateSeq - Update sequence.public boolean needForceKeys()
needForceKeys in interface GridCachePreloaderneedForceKeys in class GridCachePreloaderAdaptertrue if there is no need to force keys preloading
(e.g. rebalancing has been completed).public GridDhtFuture<Object> request(GridCacheContext cctx, GridNearAtomicAbstractUpdateRequest req, AffinityTopologyVersion topVer)
request in interface GridCachePreloaderrequest in class GridCachePreloaderAdaptercctx - Cache context.req - Message with keys to request.topVer - Topology version, -1 if not required.public GridDhtFuture<Object> request(GridCacheContext cctx, Collection<KeyCacheObject> keys, AffinityTopologyVersion topVer)
GridCachePreloaderAdapterrequest in interface GridCachePreloaderrequest in class GridCachePreloaderAdapterkeys - Keys to request.cctx - Cache context.topVer - Topology version, -1 if not required.public IgniteInternalFuture<Boolean> forceRebalance()
forceRebalance in interface GridCachePreloaderforceRebalance in class GridCachePreloaderAdapterpublic void unwindUndeploys()
unwindUndeploys in interface GridCachePreloaderunwindUndeploys in class GridCachePreloaderAdapterpublic void dumpDebugInfo()
dumpDebugInfo in interface GridCachePreloaderdumpDebugInfo in class GridCachePreloaderAdapter
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.7.5 Release Date : June 4 2019