public interface GridCachePreloader
void start()
throws IgniteCheckedException
IgniteCheckedException - If start failed.void onKernalStop()
void onReconnected()
void onInitialExchangeComplete(@Nullable
Throwable err)
err - Error, if any happened on initial exchange.boolean rebalanceRequired(AffinityTopologyVersion rebTopVer, GridDhtPartitionsExchangeFuture exchFut)
rebTopVer - 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).@Nullable GridDhtPreloaderAssignments generateAssignments(GridDhtPartitionExchangeId exchId, @Nullable GridDhtPartitionsExchangeFuture exchFut)
exchId - Exchange ID.exchFut - Completed exchange future. Can be null if forced or reassigned generation occurs.Runnable addAssignments(GridDhtPreloaderAssignments assignments, boolean forcePreload, long rebalanceId, Runnable next, @Nullable GridCompoundFuture<Boolean,Boolean> forcedRebFut)
assignments - Assignments to add.forcePreload - 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.void preloadPredicate(IgnitePredicate<GridCacheEntryInfo> p)
p - Preload predicate.IgnitePredicate<GridCacheEntryInfo> preloadPredicate()
null, will evaluate each preloaded entry during
send and receive, and if predicate evaluates to false, entry will be skipped.IgniteInternalFuture<Object> startFuture()
IgniteInternalFuture<?> syncFuture()
IgniteInternalFuture<Boolean> rebalanceFuture()
true 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.boolean needForceKeys()
true if there is no need to force keys preloading
(e.g. rebalancing has been completed).GridDhtFuture<Object> request(GridCacheContext cctx, Collection<KeyCacheObject> keys, AffinityTopologyVersion topVer)
cctx - Cache context.keys - Keys to request.topVer - Topology version, -1 if not required.GridDhtFuture<Object> request(GridCacheContext cctx, GridNearAtomicAbstractUpdateRequest req, AffinityTopologyVersion topVer)
cctx - Cache context.req - Message with keys to request.topVer - Topology version, -1 if not required.IgniteInternalFuture<Boolean> forceRebalance()
void unwindUndeploys()
void handleSupplyMessage(int idx,
UUID id,
GridDhtPartitionSupplyMessage s)
idx - Index.id - Node Id.s - Supply message.void handleDemandMessage(int idx,
UUID id,
GridDhtPartitionDemandMessage d)
idx - Index.id - Node Id.d - Demand message.void onTopologyChanged(GridDhtPartitionsExchangeFuture lastFut)
lastFut - Last future.void dumpDebugInfo()
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.7.5 Release Date : June 4 2019