tag:blogger.com,1999:blog-35058937.post2210537051338655707..comments2023-11-05T00:57:49.270-07:00Comments on java.think(): What is a Memoizer and why should you care about it?Taylorhttp://www.blogger.com/profile/07193759050963768511noreply@blogger.comBlogger9125tag:blogger.com,1999:blog-35058937.post-24275077175760811132011-01-20T07:34:58.606-08:002011-01-20T07:34:58.606-08:00thank you very much prada shoes prada sneakers fır...thank you very much <a href="http://www.luxurysteps.com" rel="nofollow">prada shoes</a> <a href="http://www.modaroma.com" rel="nofollow">prada sneakers</a> <a href="http://www.kupongarage.com" rel="nofollow">fırsat</a>Sahinhttps://www.blogger.com/profile/15370336873511488157noreply@blogger.comtag:blogger.com,1999:blog-35058937.post-5162456803849269682008-09-30T04:44:00.000-07:002008-09-30T04:44:00.000-07:00Thanks for sharing this, Ben! Didn't expect that, ...Thanks for sharing this, Ben! Didn't expect that, looks great.Buddy Casinohttps://www.blogger.com/profile/02909308245218398837noreply@blogger.comtag:blogger.com,1999:blog-35058937.post-74124179106761065522008-09-26T12:18:00.000-07:002008-09-26T12:18:00.000-07:00Coincidentally, I put up a decorator implementatio...Coincidentally, I put up a decorator implementation last night due to a user request of my library. Combined, this provides an ad-hoc cache per Buddy's concern.<BR/>http://code.google.com/p/concurrentlinkedhashmap/wiki/SelfPopulatingCacheBen Maneshttps://www.blogger.com/profile/00834822013559658168noreply@blogger.comtag:blogger.com,1999:blog-35058937.post-82143017718771252162008-09-22T17:01:00.000-07:002008-09-22T17:01:00.000-07:00@mario,No, you are right, it's not the same - I fo...@mario,<BR/><BR/>No, you are right, it's not the same - I found a reference from the concurrency mailing list. <BR/><BR/>I've also begun to make my own modifications, as I noted, one of them is to control the # of segments in the backing CHM. Another, which I removed, is to implement the remove method.Taylorhttps://www.blogger.com/profile/07193759050963768511noreply@blogger.comtag:blogger.com,1999:blog-35058937.post-71764392673064471672008-09-22T15:37:00.000-07:002008-09-22T15:37:00.000-07:00Nice post!... but hmmm, did i miss something, or i...Nice post!<BR/><BR/>... but hmmm, did i miss something, or is your example not exactly the one from within the book 'Java Concurrency in Practice' ?<BR/><BR/>Greetings<BR/><BR/>Mario Gleichmannmario.gleichmannhttps://www.blogger.com/profile/10220150226701796268noreply@blogger.comtag:blogger.com,1999:blog-35058937.post-32552999830986450192008-09-22T08:09:00.000-07:002008-09-22T08:09:00.000-07:00@Khalil and buddy casinoI agree, as written there ...@Khalil and buddy casino<BR/><BR/>I agree, as written there is no remove. I've thought through the process of remove delegation to the CHM should be just fine, and I in fact had implemented remove in a version of the Memoizer I use (I elided it for simplicity here, I suppose I shouldn't have).<BR/><BR/>So, remove would be just:<BR/><BR/>public V remove(final A arg) <BR/>{<BR/> return cache.remove(arg);<BR/>}Taylorhttps://www.blogger.com/profile/07193759050963768511noreply@blogger.comtag:blogger.com,1999:blog-35058937.post-54368713788360768812008-09-22T07:41:00.000-07:002008-09-22T07:41:00.000-07:00This reminded me of this link (from Doug Lea) on l...This reminded me of this link (from Doug Lea) on lazy map initialization, which is a separate but related topic:<BR/><BR/>http://artisans-serverintellect-com.si-eioswww6.com/default.asp?W122Alex Millerhttps://www.blogger.com/profile/01929662536395624733noreply@blogger.comtag:blogger.com,1999:blog-35058937.post-41603586112271296822008-09-22T06:52:00.000-07:002008-09-22T06:52:00.000-07:00I played around with the Memoizer once, and it lac...I played around with the Memoizer once, and it lacks a mechanism to expire items and/or limit the bumber of entries.<BR/>Basically, it's just a example of a concurrent caching pattern done right, not a full-blown caching solution.<BR/><BR/>I don't feel confident implementing those missing features, as I'm pretty sure to screw up the concurrency issues in a subtle way. Has anyone else gotten around to do that?Buddy Casinohttps://www.blogger.com/profile/02909308245218398837noreply@blogger.comtag:blogger.com,1999:blog-35058937.post-12275610370390510712008-09-22T04:24:00.000-07:002008-09-22T04:24:00.000-07:00Couple of comments: Does the Memoizer have a clear...Couple of comments: Does the Memoizer have a clear/reset method to clear the cache and allow values to be GCed, couldn't the ConcurrentMap in the Memoizer implementation be a ConcurrentReferenceMap, secondly how would you deal with multiple arguments, varargs? or box them in an array like structure with equals and hashCode support.<BR/><BR/>Cheers,<BR/>KhalilKhalilhttps://www.blogger.com/profile/08118327649880443283noreply@blogger.com