Apache Geode Native Client Cache::createRegion:区域存在于本地缓存中



为了回答这个问题,我正在使用 Pivotal 本机客户端创建许多本地客户端缓存,以便每个本地客户端缓存都有自己的Listener。我遇到了一个问题,即从缓存、池和区域工厂创建为默认值后的快速入门示例中,无论使用哪种RegionShortcut,例如.LOCAL或任何其他

RegionFactory rf = c.CreateRegionFactory(RegionShortcut.LOCAL);

然后:

IRegion<string, string> region = rf.SetPoolName(poolName).Create<string, string>("exampleRegion");

对于客户端缓存的第一个实例来说很好,但是一旦尝试将任何其他实例作为另一个本地客户端缓存,那么上面的代码就会出现错误:

An unhandled exception of type 'Apache.Geode.Client.RegionExistsException' occurred in Pivotal.Gemfire.dll

Additional information: Cache::createRegion: "exampleRegion" region exists in local cache

那么,如何在同一 C# 项目中创建许多本地客户端缓存呢?

当使用区域工厂并尝试订阅区域中的密钥是在缓存和区域初始化的单独(后台)线程上完成时,再次发生这种情况。

最新更新