当前位置: 首页>>代码示例>>C#>>正文


C# ClientConfig.GetNearCacheConfig方法代码示例

本文整理汇总了C#中ClientConfig.GetNearCacheConfig方法的典型用法代码示例。如果您正苦于以下问题:C# ClientConfig.GetNearCacheConfig方法的具体用法?C# ClientConfig.GetNearCacheConfig怎么用?C# ClientConfig.GetNearCacheConfig使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ClientConfig的用法示例。


在下文中一共展示了ClientConfig.GetNearCacheConfig方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: TestSpecificNearCacheConfig_whenAsteriskAtTheBeginning

 public virtual void TestSpecificNearCacheConfig_whenAsteriskAtTheBeginning()
 {
     var clientConfig = new ClientConfig();
     var genericNearCacheConfig = new NearCacheConfig();
     genericNearCacheConfig.SetName("*Map");
     clientConfig.AddNearCacheConfig(genericNearCacheConfig);
     var specificNearCacheConfig = new NearCacheConfig();
     specificNearCacheConfig.SetName("*MapStudent");
     clientConfig.AddNearCacheConfig(specificNearCacheConfig);
     var mapFoo = clientConfig.GetNearCacheConfig("fooMap");
     var mapStudentFoo = clientConfig.GetNearCacheConfig("fooMapStudent");
     Assert.AreEqual(genericNearCacheConfig, mapFoo);
     Assert.AreEqual(specificNearCacheConfig, mapStudentFoo);
 }
开发者ID:hasancelik,项目名称:hazelcast-csharp-client,代码行数:14,代码来源:ClientNearCacheConfigTest.cs

示例2: TestNearCacheConfigWildcard3

 public virtual void TestNearCacheConfigWildcard3()
 {
     NearCacheConfig nearCacheConfig = new NearCacheConfig().SetName("com.hazelcast.test.*");
     ClientConfig config = new ClientConfig();
     config.SetConfigPatternMatcher(new MatchingPointConfigPatternMatcher());
     config.AddNearCacheConfig(nearCacheConfig);
     Assert.AreEqual(nearCacheConfig, config.GetNearCacheConfig("com.hazelcast.test.myNearCache"));
 }
开发者ID:hasancelik,项目名称:hazelcast-csharp-client,代码行数:8,代码来源:MatchingPointConfigPatternMatcherTest.cs

示例3: TestMapConfigWildcardMultipleAmbiguousConfigs

 public virtual void TestMapConfigWildcardMultipleAmbiguousConfigs()
 {
     NearCacheConfig nearCacheConfig1 = new NearCacheConfig().SetName("com.hazelcast*");
     NearCacheConfig nearCacheConfig2 = new NearCacheConfig().SetName("*com.hazelcast");
     ClientConfig config = new ClientConfig();
     config.SetConfigPatternMatcher(new MatchingPointConfigPatternMatcher());
     config.AddNearCacheConfig(nearCacheConfig1);
     config.AddNearCacheConfig(nearCacheConfig2);
     config.GetNearCacheConfig("com.hazelcast");
 }
开发者ID:hasancelik,项目名称:hazelcast-csharp-client,代码行数:10,代码来源:MatchingPointConfigPatternMatcherTest.cs

示例4: TestDuplicateConfig

        public virtual void TestDuplicateConfig()
        {
            NearCacheConfig nearCacheConfig1 = new NearCacheConfig().SetName("com.hazelcast.*ap");
            NearCacheConfig nearCacheConfig2 = new NearCacheConfig().SetName("com.hazelcast*map");
            ClientConfig config = new ClientConfig();
            config.SetConfigPatternMatcher(new MatchingPointConfigPatternMatcher());
            config.AddNearCacheConfig(nearCacheConfig1);
            config.AddNearCacheConfig(nearCacheConfig2);

            config.GetNearCacheConfig("com.hazelcast.map");
        }
开发者ID:hasancelik,项目名称:hazelcast-csharp-client,代码行数:11,代码来源:MatchingPointConfigPatternMatcherTest.cs

示例5: TestSpecificNearCacheConfig_whenAsteriskInTheMiddle

 public virtual void TestSpecificNearCacheConfig_whenAsteriskInTheMiddle()
 {
     var clientConfig = new ClientConfig();
     var genericNearCacheConfig = new NearCacheConfig();
     genericNearCacheConfig.SetName("map*Bar");
     clientConfig.AddNearCacheConfig(genericNearCacheConfig);
     var specificNearCacheConfig = new NearCacheConfig();
     specificNearCacheConfig.SetName("mapStudent*Bar");
     clientConfig.AddNearCacheConfig(specificNearCacheConfig);
     var mapFoo = clientConfig.GetNearCacheConfig("mapFooBar");
     var mapStudentFoo = clientConfig.GetNearCacheConfig("mapStudentFooBar");
     Assert.AreEqual(genericNearCacheConfig, mapFoo);
     Assert.AreEqual(specificNearCacheConfig, mapStudentFoo);
 }
开发者ID:hasancelik,项目名称:hazelcast-csharp-client,代码行数:14,代码来源:ClientNearCacheConfigTest.cs

示例6: TestNearCacheConfigWildcardMatchingPointEndsWith

 public virtual void TestNearCacheConfigWildcardMatchingPointEndsWith()
 {
     NearCacheConfig nearCacheConfig1 = new NearCacheConfig().SetName("*.sub");
     NearCacheConfig nearCacheConfig2 = new NearCacheConfig().SetName("*.test.sub");
     NearCacheConfig nearCacheConfig3 = new NearCacheConfig().SetName("*.hazelcast.test.sub");
     ClientConfig config = new ClientConfig();
     config.SetConfigPatternMatcher(new MatchingPointConfigPatternMatcher());
     config.AddNearCacheConfig(nearCacheConfig1);
     config.AddNearCacheConfig(nearCacheConfig2);
     config.AddNearCacheConfig(nearCacheConfig3);
     // we should not match any of the configs (endsWith)
     Assert.AreEqual(null, config.GetNearCacheConfig("com.hazelFast.Fast.sub.myNearCache"));
     Assert.AreEqual(null, config.GetNearCacheConfig("hazelFast.test.sub.myNearCache"));
     Assert.AreEqual(null, config.GetNearCacheConfig("test.sub.myNearCache"));
 }
开发者ID:hasancelik,项目名称:hazelcast-csharp-client,代码行数:15,代码来源:MatchingPointConfigPatternMatcherTest.cs

示例7: TestNearCacheConfigWithoutWildcard

 public virtual void TestNearCacheConfigWithoutWildcard()
 {
     NearCacheConfig nearCacheConfig = new NearCacheConfig().SetName("someNearCache");
     ClientConfig config = new ClientConfig();
     config.SetConfigPatternMatcher(new MatchingPointConfigPatternMatcher());
     config.AddNearCacheConfig(nearCacheConfig);
     Assert.AreEqual(nearCacheConfig, config.GetNearCacheConfig("someNearCache"));
     // non-matching name
     Assert.AreNotEqual(nearCacheConfig, config.GetNearCacheConfig("doesNotExist"));
     // non-matching case
     Assert.AreNotEqual(nearCacheConfig, config.GetNearCacheConfig("SomeNearCache"));
 }
开发者ID:hasancelik,项目名称:hazelcast-csharp-client,代码行数:12,代码来源:MatchingPointConfigPatternMatcherTest.cs

示例8: TestNearCacheConfigWildcardOnlyMultipleConfigs

 public virtual void TestNearCacheConfigWildcardOnlyMultipleConfigs()
 {
     NearCacheConfig nearCacheConfig1 = new NearCacheConfig().SetName("*");
     NearCacheConfig nearCacheConfig2 = new NearCacheConfig().SetName("com.hazelcast.*");
     ClientConfig config = new ClientConfig();
     config.SetConfigPatternMatcher(new MatchingPointConfigPatternMatcher());
     config.AddNearCacheConfig(nearCacheConfig1);
     config.AddNearCacheConfig(nearCacheConfig2);
     // we should get the best matching result
     Assert.AreEqual(nearCacheConfig2, config.GetNearCacheConfig("com.hazelcast.myNearCache"));
 }
开发者ID:hasancelik,项目名称:hazelcast-csharp-client,代码行数:11,代码来源:MatchingPointConfigPatternMatcherTest.cs

示例9: TestNearCacheConfigWildcardMatchingPointStartsWith

 public virtual void TestNearCacheConfigWildcardMatchingPointStartsWith()
 {
     var nearCacheConfig1 = new NearCacheConfig().SetName("hazelcast.*");
     var nearCacheConfig2 = new NearCacheConfig().SetName("hazelcast.test.*");
     var nearCacheConfig3 = new NearCacheConfig().SetName("hazelcast.test.sub.*");
     var config = new ClientConfig();
     config.SetConfigPatternMatcher(new MatchingPointConfigPatternMatcher());
     config.AddNearCacheConfig(nearCacheConfig1);
     config.AddNearCacheConfig(nearCacheConfig2);
     config.AddNearCacheConfig(nearCacheConfig3);
     // we should not match any of the configs (startsWith)
     Assert.AreEqual(null, config.GetNearCacheConfig("com.hazelcast.myNearCache"));
     Assert.AreEqual(null, config.GetNearCacheConfig("com.hazelcast.test.myNearCache"));
     Assert.AreEqual(null, config.GetNearCacheConfig("com.hazelcast.test.sub.myNearCache"));
 }
开发者ID:ihsandemir,项目名称:hazelcast-csharp-client,代码行数:15,代码来源:MatchingPointConfigPatternMatcherTest.cs


注:本文中的ClientConfig.GetNearCacheConfig方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。