我正在寻找一种以编程方式检索所有区域并返回计数/大小的方法。我可以看到 gfsh 如何具有“列表区域”,但似乎找不到支持的 java api 命令。我试过了
cache = ClientCacheFactory().addPoolLocator().create();
RegionService regionService =
clientCache.createAuthenticatedView(properties);
但生成的 regionService.rootRegions 是空的。我可以获得查询服务并运行类似“从 /UserRegion 中选择计数(*)”之类的东西,但想动态检索这些区域。