This content has been marked as final.
Show 2 replies
-
1. Re: How to get the primary cache adress of one key value in 5.1.0.final?
galder.zamarreno Jan 31, 2012 7:55 AM (in response to nkzhangni)Use cache.getAdvancedCache().getDistributionManager().getPrimaryLocation(key)
-
2. Re: How to get the primary cache adress of one key value in 5.1.0.final?
dan.berindei Jan 31, 2012 6:04 PM (in response to galder.zamarreno)Just to make it clear: even if you configure a ConsistentHash, we only use the ConsistentHash instance from the configuration as a template. Every time the membership of the cache changes, we create a new ConsistentHash object.
You can use the methods in DistributionManager to access the current ConsistentHash, either explicitly or via helper methods like getPrimaryLocation(key).