public interface GridCachePreloader
| Modifier and Type | Method and Description |
|---|---|
GridDhtPartitionDemander.RebalanceFuture |
addAssignments(GridDhtPreloaderAssignments assignments,
boolean forcePreload,
long rebalanceId,
GridDhtPartitionDemander.RebalanceFuture next,
@Nullable GridCompoundFuture<Boolean,Boolean> forcedRebFut,
GridCompoundFuture<Boolean,Boolean> compatibleRebFut)
Adds assignments to preloader.
|
long |
batchesPrefetchCount()
The number of batches generated by supply node at rebalancing procedure start.
|
int |
batchSize()
The supply message size in bytes to be loaded within a single rebalance batch.
|
void |
dumpDebugInfo()
Dumps debug information.
|
void |
finishPreloading(AffinityTopologyVersion topVer,
long rebalanceId)
Finish preloading for given topology version.
|
IgniteInternalFuture<Boolean> |
forceRebalance()
Force Rebalance process.
|
@Nullable GridDhtPreloaderAssignments |
generateAssignments(GridDhtPartitionExchangeId exchId,
@Nullable GridDhtPartitionsExchangeFuture exchFut) |
void |
handleDemandMessage(int idx,
UUID id,
GridDhtPartitionDemandMessage d)
Handles Demand message.
|
void |
handleSupplyMessage(UUID id,
GridDhtPartitionSupplyMessage s)
Handles Supply message.
|
boolean |
needForceKeys() |
void |
onInitialExchangeComplete(@Nullable Throwable err)
Callback by exchange manager when initial partition exchange is complete.
|
void |
onKernalStop()
Kernal stop callback.
|
void |
onReconnected()
Client reconnected callback.
|
void |
onTopologyChanged(GridDhtPartitionsExchangeFuture lastFut) |
void |
pause()
Pause preloader.
|
IgniteInternalFuture<Boolean> |
rebalanceFuture() |
boolean |
rebalanceRequired(GridDhtPartitionsExchangeFuture exchFut) |
GridDhtFuture<Object> |
request(GridCacheContext cctx,
Collection<KeyCacheObject> keys,
AffinityTopologyVersion topVer)
Requests that preloader sends the request for the key.
|
GridDhtFuture<Object> |
request(GridCacheContext cctx,
GridNearAtomicAbstractUpdateRequest req,
AffinityTopologyVersion topVer)
Requests that preloader sends the request for the key.
|
void |
resume()
Resume preloader.
|
void |
start()
Starts preloading.
|
IgniteInternalFuture<Object> |
startFuture() |
IgniteInternalFuture<?> |
syncFuture() |
long |
throttle()
Time in milliseconds to wait between rebalance messages to avoid overloading of CPU or network.
|
long |
timeout()
Rebalance timeout for supply and demand messages in milliseconds.
|
void start()
throws IgniteCheckedException
IgniteCheckedException - If start failed.void onKernalStop()
void onReconnected()
void onInitialExchangeComplete(@Nullable
@Nullable Throwable err)
err - Error, if any happened on initial exchange.boolean rebalanceRequired(GridDhtPartitionsExchangeFuture exchFut)
exchFut - Completed exchange future.True if rebalance should be started (previous will be interrupted).@Nullable @Nullable GridDhtPreloaderAssignments generateAssignments(GridDhtPartitionExchangeId exchId, @Nullable @Nullable GridDhtPartitionsExchangeFuture exchFut)
exchId - Exchange ID.exchFut - Completed exchange future. Can be null if forced or reassigned generation occurs.GridDhtPartitionDemander.RebalanceFuture addAssignments(GridDhtPreloaderAssignments assignments, boolean forcePreload, long rebalanceId, GridDhtPartitionDemander.RebalanceFuture next, @Nullable @Nullable GridCompoundFuture<Boolean,Boolean> forcedRebFut, GridCompoundFuture<Boolean,Boolean> compatibleRebFut)
assignments - Assignments to add.forcePreload - True if preload requested by ForceRebalanceExchangeTask.rebalanceId - Rebalance id created by exchange thread.next - Rebalance's future follows after the current one.forcedRebFut - External future for forced rebalance.compatibleRebFut - Future for waiting for compatible rebalances.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 handleSupplyMessage(UUID id, GridDhtPartitionSupplyMessage s)
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()
void pause()
void resume()
long timeout()
The IgniteConfiguration.getRebalanceTimeout() will be used by default. If an Ignite's configuration value
is not provided than the CacheConfiguration.getRebalanceTimeout() will be used instead.
long batchesPrefetchCount()
The IgniteConfiguration.getRebalanceBatchesPrefetchCount() will be used by default. If an Ignite's
configuration value is not provided than the CacheConfiguration.getRebalanceBatchesPrefetchCount()
will be used instead.
long throttle()
The IgniteConfiguration.getRebalanceThrottle() will be used by default. If an Ignite's
configuration value is not provided than the CacheConfiguration.getRebalanceThrottle()
will be used instead.
0 to disable throttling.int batchSize()
The IgniteConfiguration.getRebalanceBatchSize() will be used by default. If an Ignite's
configuration value is not provided than the CacheConfiguration.getRebalanceBatchSize()
will be used instead.
void finishPreloading(AffinityTopologyVersion topVer, long rebalanceId)
topVer - Topology version.rebalanceId - Rebalance id.
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.11.1 Release Date : December 20 2021