/** * @param ctx Kernal context. */ public FilePageStoreManager(GridKernalContext ctx) { igniteCfg = ctx.config(); DataStorageConfiguration dsCfg = igniteCfg.getDataStorageConfiguration(); assert dsCfg != null; this.dsCfg = dsCfg; pageStoreV1FileIoFactory = pageStoreFileIoFactory = dsCfg.getFileIOFactory(); marshaller = MarshallerUtils.jdkMarshaller(ctx.igniteInstanceName()); }
when(persistentCfg1.getWalSegmentSize()).thenReturn(DataStorageConfiguration.DFLT_WAL_SEGMENT_SIZE); final FileIOFactory fileIOFactory = new DataStorageConfiguration().getFileIOFactory(); when(persistentCfg1.getFileIOFactory()).thenReturn(fileIOFactory);
return; fileIOFactory = ctx.config().getDataStorageConfiguration().getFileIOFactory();
/** * @param ctx Kernal context. */ public FileWriteAheadLogManager(@NotNull final GridKernalContext ctx) { igCfg = ctx.config(); DataStorageConfiguration dsCfg = igCfg.getDataStorageConfiguration(); assert dsCfg != null; this.dsCfg = dsCfg; maxWalSegmentSize = dsCfg.getWalSegmentSize(); mode = dsCfg.getWalMode(); flushFreq = dsCfg.getWalFlushFrequency(); alwaysWriteFullPages = dsCfg.isAlwaysWriteFullPages(); ioFactory = mode == WALMode.FSYNC ? dsCfg.getFileIOFactory() : new RandomAccessFileIOFactory(); segmentFileInputFactory = new SimpleSegmentFileInputFactory(); walAutoArchiveAfterInactivity = dsCfg.getWalAutoArchiveAfterInactivity(); allowedThresholdWalArchiveSize = (long)(dsCfg.getMaxWalArchiveSize() * THRESHOLD_WAL_ARCHIVE_SIZE_PERCENTAGE); evt = ctx.event(); failureProcessor = ctx.failure(); fileHandleManagerFactory = new FileHandleManagerFactory(dsCfg); maxSegCountWithoutCheckpoint = (long)((U.adjustedWalHistorySize(dsCfg, log) * CHECKPOINT_TRIGGER_ARCHIVE_SIZE_PERCENTAGE) / dsCfg.getWalSegmentSize()); }
/** * @param ctx Kernal context. */ public GridCacheDatabaseSharedManager(GridKernalContext ctx) { IgniteConfiguration cfg = ctx.config(); persistenceCfg = cfg.getDataStorageConfiguration(); assert persistenceCfg != null; checkpointFreq = persistenceCfg.getCheckpointFrequency(); truncateWalOnCpFinish = persistenceCfg.isWalHistorySizeParameterUsed() ? persistenceCfg.getWalHistorySize() != Integer.MAX_VALUE : persistenceCfg.getMaxWalArchiveSize() != Long.MAX_VALUE; lockWaitTime = persistenceCfg.getLockWaitTime(); persStoreMetrics = new DataStorageMetricsImpl( persistenceCfg.isMetricsEnabled(), persistenceCfg.getMetricsRateTimeInterval(), persistenceCfg.getMetricsSubIntervalCount() ); ioFactory = persistenceCfg.getFileIOFactory(); Long cfgCheckpointReadLockTimeout = ctx.config().getDataStorageConfiguration() != null ? ctx.config().getDataStorageConfiguration().getCheckpointReadLockTimeout() : null; checkpointReadLockTimeout = IgniteSystemProperties.getLong(IGNITE_CHECKPOINT_READ_LOCK_TIMEOUT, cfgCheckpointReadLockTimeout != null ? cfgCheckpointReadLockTimeout : (ctx.workersRegistry() != null ? ctx.workersRegistry().getSystemWorkerBlockedTimeout() : ctx.config().getFailureDetectionTimeout())); }
walRecordIterBuffSize = cfg.getWalRecordIteratorBufferSize(); alwaysWriteFullPages = cfg.isAlwaysWriteFullPages(); fileIOFactory = compactClass(cfg.getFileIOFactory()); metricsSubIntervalCount = cfg.getMetricsSubIntervalCount(); metricsRateTimeInterval = cfg.getMetricsRateTimeInterval();
/** * @param ctx Kernal context. */ public FilePageStoreManager(GridKernalContext ctx) { igniteCfg = ctx.config(); DataStorageConfiguration dsCfg = igniteCfg.getDataStorageConfiguration(); assert dsCfg != null; this.dsCfg = dsCfg; pageStoreV1FileIoFactory = pageStoreFileIoFactory = dsCfg.getFileIOFactory(); }
/** * @param ctx Kernal context. */ public FsyncModeFileWriteAheadLogManager(@NotNull final GridKernalContext ctx) { igCfg = ctx.config(); DataStorageConfiguration dsCfg = igCfg.getDataStorageConfiguration(); assert dsCfg != null; this.dsCfg = dsCfg; maxWalSegmentSize = dsCfg.getWalSegmentSize(); mode = dsCfg.getWalMode(); tlbSize = dsCfg.getWalThreadLocalBufferSize(); flushFreq = dsCfg.getWalFlushFrequency(); fsyncDelay = dsCfg.getWalFsyncDelayNanos(); alwaysWriteFullPages = dsCfg.isAlwaysWriteFullPages(); ioFactory = dsCfg.getFileIOFactory(); segmentFileInputFactory = new SimpleSegmentFileInputFactory(); walAutoArchiveAfterInactivity = dsCfg.getWalAutoArchiveAfterInactivity(); evt = ctx.event(); allowedThresholdWalArchiveSize = (long)(dsCfg.getMaxWalArchiveSize() * THRESHOLD_WAL_ARCHIVE_SIZE_PERCENTAGE); assert mode == WALMode.FSYNC : dsCfg; }
/** * @param ctx Kernal context. */ public GridCacheDatabaseSharedManager(GridKernalContext ctx) { IgniteConfiguration cfg = ctx.config(); persistenceCfg = cfg.getDataStorageConfiguration(); assert persistenceCfg != null; checkpointFreq = persistenceCfg.getCheckpointFrequency(); truncateWalOnCpFinish = persistenceCfg.isWalHistorySizeParameterUsed() ? persistenceCfg.getWalHistorySize() != Integer.MAX_VALUE : persistenceCfg.getMaxWalArchiveSize() != Long.MAX_VALUE; lockWaitTime = persistenceCfg.getLockWaitTime(); persStoreMetrics = new DataStorageMetricsImpl( persistenceCfg.isMetricsEnabled(), persistenceCfg.getMetricsRateTimeInterval(), persistenceCfg.getMetricsSubIntervalCount() ); ioFactory = persistenceCfg.getFileIOFactory(); Long cfgCheckpointReadLockTimeout = ctx.config().getDataStorageConfiguration() != null ? ctx.config().getDataStorageConfiguration().getCheckpointReadLockTimeout() : null; checkpointReadLockTimeout = IgniteSystemProperties.getLong(IGNITE_CHECKPOINT_READ_LOCK_TIMEOUT, cfgCheckpointReadLockTimeout != null ? cfgCheckpointReadLockTimeout : (ctx.workersRegistry() != null ? ctx.workersRegistry().getSystemWorkerBlockedTimeout() : ctx.config().getFailureDetectionTimeout())); }
walRecordIterBuffSize = cfg.getWalRecordIteratorBufferSize(); alwaysWriteFullPages = cfg.isAlwaysWriteFullPages(); fileIOFactory = compactClass(cfg.getFileIOFactory()); metricsSubIntervalCount = cfg.getMetricsSubIntervalCount(); metricsRateTimeInterval = cfg.getMetricsRateTimeInterval();