/// <summary> /// Checks the default properties. /// </summary> /// <param name="cfg">Config.</param> private static void CheckDefaultProperties(DataRegionConfiguration cfg) { Assert.AreEqual(DataRegionConfiguration.DefaultEmptyPagesPoolSize, cfg.EmptyPagesPoolSize); Assert.AreEqual(DataRegionConfiguration.DefaultEvictionThreshold, cfg.EvictionThreshold); Assert.AreEqual(DataRegionConfiguration.DefaultInitialSize, cfg.InitialSize); Assert.AreEqual(DataRegionConfiguration.DefaultMaxSize, cfg.MaxSize); Assert.AreEqual(DataRegionConfiguration.DefaultPersistenceEnabled, cfg.PersistenceEnabled); Assert.AreEqual(DataRegionConfiguration.DefaultMetricsRateTimeInterval, cfg.MetricsRateTimeInterval); Assert.AreEqual(DataRegionConfiguration.DefaultMetricsSubIntervalCount, cfg.MetricsSubIntervalCount); }
protected IgniteCacheSchema( string id, Type keyType, Type valueType, DataRegionConfiguration region) { Id = id; KeyType = keyType; ValueType = valueType; Region = region; }
protected IgniteCacheSchema <TKey, TValue> Declare <TKey, TValue>( string id, DataRegionConfiguration region, Action <CacheConfiguration>?configureAction = null ) { var schema = new IgniteCacheSchema <TKey, TValue>(id, region, configureAction); cacheSchemata[id] = schema; return(schema); }
/// <summary> /// Checks the default properties. /// </summary> /// <param name="cfg">Config.</param> private static void CheckDefaultProperties(DataRegionConfiguration cfg) { Assert.AreEqual(DataRegionConfiguration.DefaultEmptyPagesPoolSize, cfg.EmptyPagesPoolSize); Assert.AreEqual(DataRegionConfiguration.DefaultEvictionThreshold, cfg.EvictionThreshold); Assert.AreEqual(DataRegionConfiguration.DefaultInitialSize, cfg.InitialSize); Assert.AreEqual(DataRegionConfiguration.DefaultPersistenceEnabled, cfg.PersistenceEnabled); Assert.AreEqual(DataRegionConfiguration.DefaultMetricsRateTimeInterval, cfg.MetricsRateTimeInterval); Assert.AreEqual(DataRegionConfiguration.DefaultMetricsSubIntervalCount, cfg.MetricsSubIntervalCount); Assert.AreEqual(default(long), cfg.CheckpointPageBufferSize); if (DataRegionConfiguration.DefaultMaxSize != cfg.MaxSize) { // Java respects cgroup limits only in recent JDK versions. // We don't know which version is used for tests, so we should expect both variants var physMem = MemoryInfo.TotalPhysicalMemory; Assert.IsNotNull(physMem); var expected = (long)physMem / 5; Assert.AreEqual(expected, cfg.MaxSize, string.Format("Expected max size with cgroup limit: '{0}', without: '{1}'", DataRegionConfiguration.DefaultMaxSize, expected)); } }