示例#1
0
        public void TestDynamicTemplate()
        {
            var template = new CacheConfiguration
            {
                Name               = "dynTempl*",
                Backups            = 7,
                RebalanceBatchSize = 1234
            };

            // Register template.
            Ignite.AddCacheConfiguration(template);

            // Double registration is allowed.
            Ignite.AddCacheConfiguration(template);

            var cache = Ignite.CreateCache <int, int>("dynTempl1");

            Assert.AreEqual(7, cache.GetConfiguration().Backups);
            Assert.AreEqual(1234, cache.GetConfiguration().RebalanceBatchSize);
        }