public class GridCacheDatabaseSharedManager extends IgniteCacheDatabaseSharedManager
| Modifier and Type | Class and Description |
|---|---|
class |
GridCacheDatabaseSharedManager.Checkpointer |
class |
GridCacheDatabaseSharedManager.CheckpointHistory
Checkpoint history.
|
static class |
GridCacheDatabaseSharedManager.FileLockHolder |
| Modifier and Type | Field and Description |
|---|---|
static Long |
DFLT_MAX_CHECKPOINTING_PAGE_BUFFER_SIZE
Default minimum checkpointing page buffer size (may be adjusted by Ignite).
|
static Long |
DFLT_MIN_CHECKPOINTING_PAGE_BUFFER_SIZE
Minimum checkpointing page buffer size (may be adjusted by Ignite).
|
static String |
IGNITE_PDS_CHECKPOINT_TEST_SKIP_SYNC |
Collection<Integer> |
initiallyWalDisabledGrps
Initially disabled cache groups.
|
dataRegionMap, dfltDataRegion, freeListMap, memMetricsMapcctx, diagnosticLog, log| Constructor and Description |
|---|
GridCacheDatabaseSharedManager(GridKernalContext ctx) |
addDataRegion, buildAllocPath, buildPath, createPageEvictionTracker, dataRegion, dataRegions, dumpStatistics, ensureFreeSpace, freeList, initPageMemoryDataStructures, memoryMetrics, memoryMetrics, pageSize, prepareCachesStop, reuseList, setPageSize, stop0, systemDateRegionNamecontext, isStopping, kernalStartInfo, kernalStopInfo, log, onDisconnected, onKernalStop, onReconnected, printMemoryStats, start, startInfo, stop, stopInfo, toStringpublic static final String IGNITE_PDS_CHECKPOINT_TEST_SKIP_SYNC
public static final Long DFLT_MIN_CHECKPOINTING_PAGE_BUFFER_SIZE
public static final Long DFLT_MAX_CHECKPOINTING_PAGE_BUFFER_SIZE
public Collection<Integer> initiallyWalDisabledGrps
public GridCacheDatabaseSharedManager(GridKernalContext ctx)
ctx - Kernal context.public GridCacheDatabaseSharedManager.Checkpointer getCheckpointer()
public IgniteInternalFuture<Void> enableCheckpoints(boolean enable)
protected void initDataRegions(DataStorageConfiguration memCfg) throws IgniteCheckedException
initDataRegions in class IgniteCacheDatabaseSharedManagermemCfg - Database config.IgniteCheckedException - If failed to initialize swap path.protected void start0()
throws IgniteCheckedException
start0 in class IgniteCacheDatabaseSharedManagerIgniteCheckedException - If failed.public static long checkpointBufferSize(DataRegionConfiguration regCfg)
regCfg - Configuration.public void onActivate(GridKernalContext ctx) throws IgniteCheckedException
onActivate in interface IgniteChangeGlobalStateSupportonActivate in class IgniteCacheDatabaseSharedManagerctx - Kernal context.IgniteCheckedException - If failed.public void onDeActivate(GridKernalContext kctx)
onDeActivate in interface IgniteChangeGlobalStateSupportonDeActivate in class IgniteCacheDatabaseSharedManagerkctx - Kernal context.protected IgniteOutClosure<Float> fillFactorProvider(DataRegionConfiguration dataRegCfg)
fillFactorProvider in class IgniteCacheDatabaseSharedManagerdataRegCfg - Data region configuration.public void readCheckpointAndRestoreMemory(List<DynamicCacheDescriptor> cachesToStart) throws IgniteCheckedException
readCheckpointAndRestoreMemory in class IgniteCacheDatabaseSharedManagercachesToStart - Started caches.IgniteCheckedException - If failed.public List<T2<Long,WALPointer>> nodeStartedPointers() throws IgniteCheckedException
IgniteCheckedExceptionpublic void lock()
throws IgniteCheckedException
lock in class IgniteCacheDatabaseSharedManagerIgniteCheckedExceptionpublic void unLock()
unLock in class IgniteCacheDatabaseSharedManagerprotected void onKernalStop0(boolean cancel)
onKernalStop0 in class GridCacheSharedManagerAdaptercancel - Cancel flag.protected PageMemory createPageMemory(DirectMemoryProvider memProvider, DataStorageConfiguration memCfg, DataRegionConfiguration plcCfg, DataRegionMetricsImpl memMetrics, boolean trackable)
createPageMemory in class IgniteCacheDatabaseSharedManagermemProvider - Memory provider.memCfg - Memory configuartion.plcCfg - data region configuration.memMetrics - DataRegionMetrics to collect memory usage metrics.protected void checkRegionEvictionProperties(DataRegionConfiguration regCfg, DataStorageConfiguration dbCfg) throws IgniteCheckedException
checkRegionEvictionProperties in class IgniteCacheDatabaseSharedManagerregCfg - DataRegionConfiguration to validate.dbCfg - Memory configuration.IgniteCheckedException - If config is invalid.protected void checkPageSize(DataStorageConfiguration memCfg)
checkPageSize in class IgniteCacheDatabaseSharedManagermemCfg - Memory config.public void beforeExchange(GridDhtPartitionsExchangeFuture fut) throws IgniteCheckedException
beforeExchange in class IgniteCacheDatabaseSharedManagerfut - Before exchange for the given discovery event.IgniteCheckedExceptionpublic void rebuildIndexesIfNeeded(GridDhtPartitionsExchangeFuture fut)
rebuildIndexesIfNeeded in class IgniteCacheDatabaseSharedManagerfut - Partition exchange future.@Nullable public IgniteInternalFuture indexRebuildFuture(int cacheId)
indexRebuildFuture in class IgniteCacheDatabaseSharedManagerpublic void onCacheGroupsStopped(Collection<IgniteBiTuple<CacheGroupContext,Boolean>> stoppedGrps)
onCacheGroupsStopped in class IgniteCacheDatabaseSharedManagerstoppedGrps - A collection of tuples (cache group, destroy flag).public void checkpointReadLock()
checkpointReadLock in class IgniteCacheDatabaseSharedManagerpublic boolean checkpointLockIsHeldByThread()
checkpointLockIsHeldByThread in interface CheckpointLockStateCheckercheckpointLockIsHeldByThread in class IgniteCacheDatabaseSharedManagerpublic void checkpointReadUnlock()
checkpointReadUnlock in class IgniteCacheDatabaseSharedManagerpublic Map<Integer,Map<Integer,Long>> reserveHistoryForExchange()
reserveHistoryForExchange in class IgniteCacheDatabaseSharedManagerpublic void releaseHistoryForExchange()
releaseHistoryForExchange in class IgniteCacheDatabaseSharedManagerpublic boolean reserveHistoryForPreloading(int grpId,
int partId,
long cntr)
reserveHistoryForPreloading in class IgniteCacheDatabaseSharedManagergrpId - Cache group ID.partId - Partition Id.cntr - Update counter.public void releaseHistoryForPreloading()
releaseHistoryForPreloading in class IgniteCacheDatabaseSharedManagerpublic Map<T2<Integer,Integer>,T2<Long,WALPointer>> reservedForPreloading()
@Nullable public IgniteInternalFuture wakeupForCheckpoint(String reason)
wakeupForCheckpoint in class IgniteCacheDatabaseSharedManagerpublic void waitForCheckpoint(String reason) throws IgniteCheckedException
waitForCheckpoint in class IgniteCacheDatabaseSharedManagerIgniteCheckedException - If failed.public CheckpointFuture forceCheckpoint(String reason)
forceCheckpoint in class IgniteCacheDatabaseSharedManagerreason - Reason.@Nullable public WALPointer searchPartitionCounter(int grpId, int part, @Nullable Long partCntrSince)
grpId - Cache group ID.part - Partition ID.partCntrSince - Partition counter or null to search for minimal counter.null if failed to search.public GridCacheDatabaseSharedManager.CheckpointHistory checkpointHistory()
public File checkpointDirectory()
public void addCheckpointListener(DbCheckpointListener lsnr)
lsnr - Listener.public void removeCheckpointListener(DbCheckpointListener lsnr)
lsnr - Listener.public void applyUpdatesOnRecovery(WALIterator it, IgnitePredicate<IgniteBiTuple<WALPointer,WALRecord>> recPredicate, IgnitePredicate<DataEntry> entryPredicate, Map<T2<Integer,Integer>,T2<Integer,Long>> partStates) throws IgniteCheckedException
it - WalIterator.recPredicate - Wal record filter.entryPredicate - Entry filter.partStates - Partition to restore state.IgniteCheckedExceptionpublic GridDhtPartitionState readPartitionState(CacheGroupContext grpCtx, int partId)
grpCtx - Group context.partId - Partition ID.public void onWalTruncated(WALPointer highBound)
highBound - WALPointer.public AtomicInteger writtenPagesCounter()
public int currentCheckpointPagesCount()
public void setThreadBuf(ThreadLocal<ByteBuffer> threadBuf)
threadBuf - new thread-local with buffers for the checkpoint threads.public DataStorageMetrics persistentStoreMetrics()
persistentStoreMetrics in class IgniteCacheDatabaseSharedManagernull otherwise.public DataStorageMetricsImpl persistentStoreMetricsImpl()
public MetaStorage metaStorage()
metaStorage in class IgniteCacheDatabaseSharedManagerpublic boolean walEnabled(int grpId)
walEnabled in class IgniteCacheDatabaseSharedManagergrpId - Group ID.public void walEnabled(int grpId,
boolean enabled)
walEnabled in class IgniteCacheDatabaseSharedManagergrpId - Group id.enabled - flag.
Follow @ApacheIgnite
Ignite Fabric : ver. 2.4.0 Release Date : March 5 2018