0

I am using Infinispan with jgroups in java. I want to get all the cache names in an infinispan cache cluster. I have tried using DefaultCacheManager.getCacheNames(); but it gives only caches which are accessed on that the jvm from which it is called from and not all the caches in that cluster.

Once i access a cache on that jvm, it becomes available and the it starts coming in the cachelist which i get from DefaultCacheManager.getCacheNames();

I am using the same config file for infinispan and jgroups(using tcp).

Please suggest a way by which I can get all the cache names in a cluster.

Thanks, Ankur

4

1 回答 1

1

嗯,通常您将在集群范围内定义所有缓存,因此在节点中获取缓存名称足以了解集群范围内可用的缓存。

不过,这似乎不是你的情况,所以我能想到的最简单的事情是在 Infinispan 中执行 Map/Reduce 功能,以从集群中的各个节点检索缓存名称,然后对它们进行整理。

有关更多信息,请参阅https://docs.jboss.org/author/display/ISPN/Infinispan+Distributed+Execution+Frameworkhttps://www.jboss.org/dms/judcon/presentations/Boston2011/JUDConBoston2011_day2track2session2.pdf

于 2011-12-06T09:33:05.993 回答