本文整理汇总了C#中ClientConfig.SetConfigPatternMatcher方法的典型用法代码示例。如果您正苦于以下问题:C# ClientConfig.SetConfigPatternMatcher方法的具体用法?C# ClientConfig.SetConfigPatternMatcher怎么用?C# ClientConfig.SetConfigPatternMatcher使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ClientConfig
的用法示例。
在下文中一共展示了ClientConfig.SetConfigPatternMatcher方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: 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"));
}
示例2: 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");
}
示例3: 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");
}
示例4: 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"));
}
示例5: 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"));
}
示例6: 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"));
}
示例7: 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"));
}