Class LoadAllWarmUpStrategy
- java.lang.Object
-
- org.apache.ignite.internal.processors.cache.warmup.LoadAllWarmUpStrategy
-
- All Implemented Interfaces:
WarmUpStrategy<LoadAllWarmUpConfiguration>
public class LoadAllWarmUpStrategy extends Object implements WarmUpStrategy<LoadAllWarmUpConfiguration>
"Load all" warm-up strategy, which loads pages to persistent data region until it reachesDataRegionConfiguration.getMaxSize()with priority to index partitions. Loading occurs sequentially for each cache group, starting with index partition, and then all others in ascending order.
-
-
Constructor Summary
Constructors Constructor Description LoadAllWarmUpStrategy(IgniteLogger log, Supplier<Collection<CacheGroupContext>> grpCtxSup)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected longavailableLoadPageCount(DataRegion region)Getting count of pages available for loading into data region.Class<LoadAllWarmUpConfiguration>configClass()Returns configuration class for mapping to strategy.protected Map<CacheGroupContext,List<org.apache.ignite.internal.processors.cache.warmup.LoadAllWarmUpStrategy.LoadPartition>>loadDataInfo(DataRegion region)Calculation of cache groups, partitions and count of pages that can load into data region.voidstop()Stop warming up.StringtoString()voidwarmUp(LoadAllWarmUpConfiguration cfg, DataRegion region)Warm up.
-
-
-
Constructor Detail
-
LoadAllWarmUpStrategy
public LoadAllWarmUpStrategy(IgniteLogger log, Supplier<Collection<CacheGroupContext>> grpCtxSup)
Constructor.- Parameters:
log- Logger.grpCtxSup- Cache group contexts supplier. SinceGridCacheProcessorstarts later.
-
-
Method Detail
-
configClass
public Class<LoadAllWarmUpConfiguration> configClass()
Returns configuration class for mapping to strategy.- Specified by:
configClassin interfaceWarmUpStrategy<LoadAllWarmUpConfiguration>- Returns:
- Configuration class.
-
warmUp
public void warmUp(LoadAllWarmUpConfiguration cfg, DataRegion region) throws IgniteCheckedException
Warm up.- Specified by:
warmUpin interfaceWarmUpStrategy<LoadAllWarmUpConfiguration>- Parameters:
cfg- Warm-up configuration.region- Data region.- Throws:
IgniteCheckedException- if faild.
-
stop
public void stop() throws IgniteCheckedExceptionStop warming up.- Specified by:
stopin interfaceWarmUpStrategy<LoadAllWarmUpConfiguration>- Throws:
IgniteCheckedException- if faild.
-
availableLoadPageCount
protected long availableLoadPageCount(DataRegion region)
Getting count of pages available for loading into data region.- Parameters:
region- Data region.- Returns:
- Count(non-negative) of pages available for loading into data region.
-
loadDataInfo
protected Map<CacheGroupContext,List<org.apache.ignite.internal.processors.cache.warmup.LoadAllWarmUpStrategy.LoadPartition>> loadDataInfo(DataRegion region) throws IgniteCheckedException
Calculation of cache groups, partitions and count of pages that can load into data region. Calculation starts and includes an index partition for each group.- Parameters:
region- Data region.- Returns:
- Loadable groups and partitions.
- Throws:
IgniteCheckedException- – if faild.
-
-