public class IgniteCacheDatabaseSharedManager extends GridCacheSharedManagerAdapter implements IgniteChangeGlobalStateSupport, CheckpointLockStateChecker
| Modifier and Type | Field and Description |
|---|---|
protected Map<String,DataRegion> |
dataRegionMap |
protected DataRegion |
dfltDataRegion |
protected Map<String,CacheFreeListImpl> |
freeListMap |
protected Map<String,DataRegionMetrics> |
memMetricsMap |
static String |
SYSTEM_DATA_REGION_NAME
DataRegionConfiguration name reserved for internal caches.
|
cctx, diagnosticLog, log| Constructor and Description |
|---|
IgniteCacheDatabaseSharedManager() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addDataRegion(DataStorageConfiguration dataStorageCfg,
DataRegionConfiguration dataRegionCfg,
boolean trackable) |
void |
beforeExchange(GridDhtPartitionsExchangeFuture discoEvt) |
protected File |
buildAllocPath(DataRegionConfiguration plc)
Builds allocation path for memory mapped file to be used with PageMemory.
|
protected File |
buildPath(String path,
String consId) |
protected void |
checkPageSize(DataStorageConfiguration memCfg) |
boolean |
checkpointLockIsHeldByThread() |
void |
checkpointReadLock()
No-op for non-persistent storage.
|
void |
checkpointReadUnlock()
No-op for non-persistent storage.
|
protected void |
checkRegionEvictionProperties(DataRegionConfiguration regCfg,
DataStorageConfiguration dbCfg) |
protected PageEvictionTracker |
createPageEvictionTracker(DataRegionConfiguration plc,
PageMemory pageMem) |
protected PageMemory |
createPageMemory(DirectMemoryProvider memProvider,
DataStorageConfiguration memCfg,
DataRegionConfiguration memPlcCfg,
DataRegionMetricsImpl memMetrics,
boolean trackable)
Creates PageMemory with given size and memory provider.
|
DataRegion |
dataRegion(String memPlcName) |
Collection<DataRegion> |
dataRegions() |
void |
dumpStatistics(IgniteLogger log) |
void |
ensureFreeSpace(DataRegion memPlc)
|
CheckpointFuture |
forceCheckpoint(String reason)
Allows to wait checkpoint finished.
|
FreeList |
freeList(String memPlcName) |
protected IgniteOutClosure<Long> |
freeSpaceProvider(DataRegionConfiguration dataRegCfg)
Closure that can be used to compute fill factor for provided data region.
|
IgniteInternalFuture |
indexRebuildFuture(int cacheId) |
protected void |
initDataRegions(DataStorageConfiguration memCfg) |
protected void |
initPageMemoryDataStructures(DataStorageConfiguration dbCfg) |
void |
lock() |
Collection<DataRegionMetrics> |
memoryMetrics() |
DataRegionMetrics |
memoryMetrics(String memPlcName) |
MetaStorage |
metaStorage() |
void |
onActivate(GridKernalContext kctx)
Called when cluster performing activation.
|
void |
onCacheGroupsStopped(Collection<IgniteBiTuple<CacheGroupContext,Boolean>> stoppedGrps) |
void |
onDeActivate(GridKernalContext kctx)
Called when cluster performing deactivation.
|
int |
pageSize() |
DataStorageMetrics |
persistentStoreMetrics() |
void |
prepareCachesStop()
Needed action before any cache will stop
|
void |
readCheckpointAndRestoreMemory(List<DynamicCacheDescriptor> cachesToStart) |
void |
rebuildIndexesIfNeeded(GridDhtPartitionsExchangeFuture fut) |
void |
releaseHistoryForExchange()
Release reserved update history.
|
void |
releaseHistoryForPreloading()
Release reserved update history.
|
Map<Integer,Map<Integer,Long>> |
reserveHistoryForExchange()
Reserve update history for exchange.
|
boolean |
reserveHistoryForPreloading(int grpId,
int partId,
long cntr)
Reserve update history for preloading.
|
ReuseList |
reuseList(String memPlcName) |
protected void |
setPageSize(int pageSize)
Method for fake (standalone) context initialization.
|
protected void |
start0() |
protected void |
stop0(boolean cancel) |
String |
systemDateRegionName() |
void |
unLock() |
void |
waitForCheckpoint(String reason)
Waits until current state is checkpointed.
|
IgniteInternalFuture |
wakeupForCheckpoint(String reason) |
boolean |
walEnabled(int grpId,
boolean local) |
void |
walEnabled(int grpId,
boolean enabled,
boolean local)
Marks cache group as with disabled WAL.
|
protected DirectMemoryProvider |
wrapMetricsMemoryProvider(DirectMemoryProvider memoryProvider0,
DataRegionMetricsImpl memMetrics) |
context, isStopping, kernalStartInfo, kernalStopInfo, log, onDisconnected, onKernalStop, onKernalStop0, onReconnected, printMemoryStats, start, startInfo, stop, stopInfo, toStringpublic static final String SYSTEM_DATA_REGION_NAME
protected volatile Map<String,DataRegion> dataRegionMap
protected Map<String,DataRegionMetrics> memMetricsMap
protected DataRegion dfltDataRegion
protected Map<String,CacheFreeListImpl> freeListMap
protected void start0()
throws IgniteCheckedException
start0 in class GridCacheSharedManagerAdapterIgniteCheckedException - If failed.protected void initPageMemoryDataStructures(DataStorageConfiguration dbCfg) throws IgniteCheckedException
dbCfg - Database config.IgniteCheckedException - If failed.public int pageSize()
protected void initDataRegions(DataStorageConfiguration memCfg) throws IgniteCheckedException
memCfg - Database config.IgniteCheckedException - If failed to initialize swap path.protected void addDataRegion(DataStorageConfiguration dataStorageCfg, DataRegionConfiguration dataRegionCfg, boolean trackable) throws IgniteCheckedException
dataStorageCfg - Database config.dataRegionCfg - Data region config.IgniteCheckedException - If failed to initialize swap path.protected IgniteOutClosure<Long> freeSpaceProvider(DataRegionConfiguration dataRegCfg)
dataRegCfg - Data region configuration.protected void checkPageSize(DataStorageConfiguration memCfg)
memCfg - Memory config.protected void checkRegionEvictionProperties(DataRegionConfiguration regCfg, DataStorageConfiguration dbCfg) throws IgniteCheckedException
regCfg - DataRegionConfiguration to validate.dbCfg - Memory configuration.IgniteCheckedException - If config is invalid.public void dumpStatistics(IgniteLogger log)
log - Logger.public Collection<DataRegion> dataRegions()
policies.public Collection<DataRegionMetrics> memoryMetrics()
public DataStorageMetrics persistentStoreMetrics()
null otherwise.public void readCheckpointAndRestoreMemory(List<DynamicCacheDescriptor> cachesToStart) throws IgniteCheckedException
cachesToStart - Started caches.IgniteCheckedException - If failed.@Nullable public DataRegionMetrics memoryMetrics(String memPlcName)
memPlcName - Name of DataRegion to obtain DataRegionMetrics for.DataRegionMetrics snapshot for specified DataRegion or null if
no DataRegion is configured for specified name.public DataRegion dataRegion(String memPlcName) throws IgniteCheckedException
memPlcName - data region name.DataRegion instance associated with a given DataRegionConfiguration.IgniteCheckedException - in case of request for unknown DataRegion.public FreeList freeList(String memPlcName)
memPlcName - DataRegionConfiguration name.FreeList instance associated with a given DataRegionConfiguration.public ReuseList reuseList(String memPlcName)
memPlcName - DataRegionConfiguration name.ReuseList instance associated with a given DataRegionConfiguration.protected void stop0(boolean cancel)
stop0 in class GridCacheSharedManagerAdaptercancel - Cancel flag.public boolean checkpointLockIsHeldByThread()
checkpointLockIsHeldByThread in interface CheckpointLockStateCheckerpublic void lock()
throws IgniteCheckedException
IgniteCheckedExceptionpublic void unLock()
public void checkpointReadLock()
public void checkpointReadUnlock()
@Nullable public IgniteInternalFuture wakeupForCheckpoint(String reason)
@Nullable public CheckpointFuture forceCheckpoint(String reason)
reason - Reason.public void waitForCheckpoint(String reason) throws IgniteCheckedException
IgniteCheckedException - If failed.public void beforeExchange(GridDhtPartitionsExchangeFuture discoEvt) throws IgniteCheckedException
discoEvt - Before exchange for the given discovery event.IgniteCheckedExceptionpublic void rebuildIndexesIfNeeded(GridDhtPartitionsExchangeFuture fut)
fut - Partition exchange future.public void prepareCachesStop()
public void onCacheGroupsStopped(Collection<IgniteBiTuple<CacheGroupContext,Boolean>> stoppedGrps)
stoppedGrps - A collection of tuples (cache group, destroy flag).@Nullable public IgniteInternalFuture indexRebuildFuture(int cacheId)
public Map<Integer,Map<Integer,Long>> reserveHistoryForExchange()
public void releaseHistoryForExchange()
public boolean reserveHistoryForPreloading(int grpId,
int partId,
long cntr)
grpId - Cache group ID.partId - Partition Id.cntr - Update counter.public void releaseHistoryForPreloading()
public void ensureFreeSpace(DataRegion memPlc) throws IgniteCheckedException
memPlc - data region.IgniteCheckedExceptionprotected PageEvictionTracker createPageEvictionTracker(DataRegionConfiguration plc, PageMemory pageMem)
plc - data region Configuration.pageMem - Page memory.@Nullable protected File buildAllocPath(DataRegionConfiguration plc) throws IgniteCheckedException
plc - DataRegionConfiguration.IgniteCheckedException - If resolving swap directory fails.protected PageMemory createPageMemory(DirectMemoryProvider memProvider, DataStorageConfiguration memCfg, DataRegionConfiguration memPlcCfg, DataRegionMetricsImpl memMetrics, boolean trackable)
memProvider - Memory provider.memCfg - Memory configuartion.memPlcCfg - data region configuration.memMetrics - DataRegionMetrics to collect memory usage metrics.protected DirectMemoryProvider wrapMetricsMemoryProvider(DirectMemoryProvider memoryProvider0, DataRegionMetricsImpl memMetrics)
memoryProvider0 - Memory provider.memMetrics - Memory metrics.protected File buildPath(String path, String consId) throws IgniteCheckedException
path - Path to the working directory.consId - Consistent ID of the local node.IgniteCheckedException - If resolving swap directory fails.public void onActivate(GridKernalContext kctx) throws IgniteCheckedException
onActivate in interface IgniteChangeGlobalStateSupportkctx - Kernal context.IgniteCheckedException - If failed.public void onDeActivate(GridKernalContext kctx)
onDeActivate in interface IgniteChangeGlobalStateSupportkctx - Kernal context.public String systemDateRegionName()
protected void setPageSize(int pageSize)
pageSize - configured page sizepublic MetaStorage metaStorage()
public boolean walEnabled(int grpId,
boolean local)
grpId - Group ID.public void walEnabled(int grpId,
boolean enabled,
boolean local)
grpId - Group id.enabled - flag.
Follow @ApacheIgnite
Ignite Fabric : ver. 2.6.0 Release Date : July 10 2018