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 boolean disableRebalancingCancellationOptimization()
public 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 GridDhtPreloaderAssignments generateAssignments(GridDhtPartitionExchangeId exchId, GridDhtPartitionsExchangeFuture exchFut)
generateAssignments 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 GridDhtPartitionDemander.RebalanceFuture prepare(GridDhtPartitionExchangeId exchId, @Nullable @Nullable GridDhtPartitionsExchangeFuture exchFut, long rebalanceId, GridDhtPartitionDemander.RebalanceFuture next, @Nullable @Nullable GridCompoundFuture<Boolean,Boolean> forcedRebFut, GridCompoundFuture<Boolean,Boolean> compatibleRebFut)
prepare in interface GridCachePreloaderprepare in class GridCachePreloaderAdapterexchId - Exchange ID.exchFut - Completed exchange future. Can be null if forced or reassigned generation occurs.rebalanceId - Rebalance id created by exchange thread.next - Rebalance future follows after the current one.forcedRebFut - External future for forced rebalance.compatibleRebFut - Future for waiting for compatible rebalances.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 tryFinishEviction(GridDhtLocalPartition part)
part - Evicted partition.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 GridCachePreloaderAdapterpublic void finishPreloading(AffinityTopologyVersion topVer, long rebalanceId)
finishPreloading in interface GridCachePreloaderfinishPreloading in class GridCachePreloaderAdaptertopVer - Topology version.rebalanceId - Rebalance id.public GridDhtPartitionSupplier supplier()
public void supplier(GridDhtPartitionSupplier supplier)
supplier - Supplier.public GridDhtPartitionDemander demander()
public void demander(GridDhtPartitionDemander demander)
demander - Demander.
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.15.0 Release Date : April 25 2023