我尝试在文档上使用map listener with predicates。
我正在使用.net 3.9客户端,我配置了我的Java(也是Hazelcast 3.9)代码。但是我的听众并没有开火。
myTestMap.AddEntryListener(new EntryAdapter<string,MyTestMap> { Added = e => ValidateData(e) },new SqlPredicate("Status=2"),true);
当旧值与谓词不匹配时,新值与谓词匹配
写在文件上。但任何事件火灾包括没有谓词。
更新:我更新版本3.9.1并尝试使用EntryAddedListener
。
我更新了代码;
myTestMap.AddEntryListener(new TestListener(),new SqlPredicate("Status=2"),true);
public class TestListener: EntryAddedListener<string,MyTestMap> {
public void EntryAdded(EntryEvent<string,MyTestMap> @event) {
ValidateData(@event);
}
}
这一次,我得到了:
您的应用已进入中断状态,但没有要显示的代码,因为所有线程都在执行外部代码(通常是系统或框架代码)。
更新2:好的,我发现了问题,并尝试修复它。
ClientMapProxy.AddEntryListener(MapListener listener,.....
方法有递归调用,所以我得到以前的异常。
答案 0 :(得分:0)
您的使用完全正确,预计可以正常使用。通过查看我们的Github存储库,我发现您已经发现它确实是一个错误并报告了它(https://github.com/hazelcast/hazelcast-csharp-client/issues/145),感谢它。
为了其他人遇到同样的问题,我们正在考虑修复它,请查看上面链接的问题。
再次感谢您提交报告并深入了解报告!