public class GridDhtPreloader extends GridCachePreloaderAdapter
| Modifier and Type | Field and Description |
|---|---|
static long |
DFLT_PRELOAD_RESEND_TIMEOUT
Default preload resend timeout.
|
ctx, grp, log| Constructor and Description |
|---|
GridDhtPreloader(CacheGroupContext grp) |
batchesPrefetchCount, batchSize, dumpDebugInfo, throttle, timeoutpublic 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 onKernalStop()
onKernalStop in interface GridCachePreloaderonKernalStop in class GridCachePreloaderAdapterpublic void onInitialExchangeComplete(@Nullable
@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(UUID nodeId, GridDhtPartitionSupplyMessage s)
handleSupplyMessage in interface GridCachePreloaderhandleSupplyMessage in class GridCachePreloaderAdapternodeId - Node Id.s - Supply message.public void handleDemandMessage(int idx,
UUID nodeId,
GridDhtPartitionDemandMessage d)
handleDemandMessage in interface GridCachePreloaderhandleDemandMessage in class GridCachePreloaderAdapteridx - Index.nodeId - Node Id.d - Demand message.public Runnable addAssignments(GridDhtPreloaderAssignments assignments, boolean forceRebalance, long rebalanceId, Runnable next, @Nullable @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 pause()
pause in interface GridCachePreloaderpause in class GridCachePreloaderAdapterpublic void resume()
resume in interface GridCachePreloaderresume in class GridCachePreloaderAdapter
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.8.0 Release Date : February 27 2020