[infinispan-dev] DefaultConsistentHash locate
Manik Surtani
manik at jboss.org
Wed Apr 22 15:25:03 EDT 2009
On 22 Apr 2009, at 16:19, Vladimir Blagojevic wrote:
> I'll just shoot questions as I am getting familiar with design and
> code. If it makes sense, and to my naive eye it does, why don't we
> cache results of locate calls?
DIST code is still very much work in progress. There will be several
inefficiencies, and yes caching the results of locate calls where
possible is something to look into. One thing that may prevent it
being viable though (haven't thought about this too much yet) is that
you may have to cache for every valid hashcode (range of
Integer.MIN_VALUE to Integer.MAX_VALUE), and also this cache would be
useless/need to be flushed every time there is a re-hash. So there
would be tradeoffs to consider...
Keep the questions coming though! :)
Cheers
--
Manik Surtani
manik at jboss.org
Lead, Infinispan
Lead, JBoss Cache
http://www.infinispan.org
http://www.jbosscache.org
More information about the infinispan-dev
mailing list