public class GridDhtPreloader extends GridCachePreloaderAdapter
| Modifier and Type | Field and Description |
|---|---|
static long |
DFLT_PRELOAD_RESEND_TIMEOUT
Default preload resend timeout.
|
static IgniteProductVersion |
REBALANCING_VER_2_SINCE
Rebalancing was refactored at version 1.5.0, but backward compatibility to previous implementation was saved.
|
aff, cctx, log, preloadPred| Constructor and Description |
|---|
GridDhtPreloader(GridCacheContext<?,?> cctx) |
onExchangeFutureAdded, preloadPredicate, stoppublic static final IgniteProductVersion REBALANCING_VER_2_SINCE
public static final long DFLT_PRELOAD_RESEND_TIMEOUT
public GridDhtPreloader(GridCacheContext<?,?> cctx)
cctx - Cache context.public void start()
start in interface GridCachePreloaderstart in class GridCachePreloaderAdapterpublic void onKernalStart()
throws IgniteCheckedException
onKernalStart in interface GridCachePreloaderonKernalStart in class GridCachePreloaderAdapterIgniteCheckedException - If failed.public 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 updateLastExchangeFuture(GridDhtPartitionsExchangeFuture lastFut)
updateLastExchangeFuture in interface GridCachePreloaderupdateLastExchangeFuture in class GridCachePreloaderAdapterlastFut - Last future.public void onTopologyChanged(AffinityTopologyVersion topVer)
onTopologyChanged in interface GridCachePreloaderonTopologyChanged in class GridCachePreloaderAdaptertopVer - Topology version.public GridDhtPreloaderAssignments assign(GridDhtPartitionsExchangeFuture exchFut)
assign in interface GridCachePreloaderassign in class GridCachePreloaderAdapterexchFut - Exchange future to assign.public void onReconnected()
onReconnected in interface GridCachePreloaderonReconnected in class GridCachePreloaderAdapterpublic void handleSupplyMessage(int idx,
UUID id,
GridDhtPartitionSupplyMessageV2 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 Callable<Boolean> addAssignments(GridDhtPreloaderAssignments assignments, boolean forcePreload, Collection<String> caches, int cnt)
addAssignments in interface GridCachePreloaderaddAssignments in class GridCachePreloaderAdapterassignments - Assignments to add.forcePreload - Force preload flag.caches - Rebalancing of these caches will be finished before this started.cnt - Counter.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.
Note that topology change creates new futures and finishes previous.public IgniteInternalFuture<?> initialRebalanceFuture()
initialRebalanceFuture in interface GridCachePreloaderinitialRebalanceFuture in class GridCachePreloaderAdapterpublic void addDhtAssignmentFetchFuture(AffinityTopologyVersion topVer, GridDhtAssignmentFetchFuture fut)
topVer - Requested topology version.fut - Future to add.public void removeDhtAssignmentFetchFuture(AffinityTopologyVersion topVer, GridDhtAssignmentFetchFuture fut)
topVer - Requested topology version.fut - Future to remove.public void onPartitionEvicted(GridDhtLocalPartition part, boolean updateSeq)
part - Evicted partition.updateSeq - Update sequence.public GridDhtFuture<Object> request(Collection<KeyCacheObject> keys, AffinityTopologyVersion topVer)
GridCachePreloaderAdapterrequest in interface GridCachePreloaderrequest in class GridCachePreloaderAdapterkeys - Keys to request.topVer - Topology version, -1 if not required.public void forcePreload()
forcePreload in interface GridCachePreloaderforcePreload in class GridCachePreloaderAdapterpublic void unwindUndeploys()
unwindUndeploys in interface GridCachePreloaderunwindUndeploys in class GridCachePreloaderAdapterpublic void evictPartitionAsync(GridDhtLocalPartition part)
evictPartitionAsync in interface GridCachePreloaderevictPartitionAsync in class GridCachePreloaderAdapterpart - Partition.public void dumpDebugInfo()
dumpDebugInfo in interface GridCachePreloaderdumpDebugInfo in class GridCachePreloaderAdapter
Follow @ApacheIgnite
Ignite Fabric : ver. 1.5.0-b1 Release Date : December 1 2015