Closed GoogleCodeExporter closed 9 years ago
It's been on our minds that a map constructed by MapMaker doesn't have the kind
of "size" method you'd really want. Right now, it painstakingly counts every
element to get an exact result, even if it ends up having to lock the entire
table to do it (in extreme cases)! What you'd rather have is a fast
approximation. Once you had the ability to do this for a "MapMaker-made map",
the way to expose the feature to interners might be just to allow a custom
MapMaker to be provided when creating the interner. Which would of course
allow other features as well.
Original comment by kevinb@google.com
on 10 Jun 2010 at 4:57
Original comment by fry@google.com
on 28 Jan 2011 at 4:18
Original comment by kevinb@google.com
on 13 Jul 2011 at 6:18
Original comment by kevinb@google.com
on 16 Jul 2011 at 8:37
Original comment by fry@google.com
on 10 Dec 2011 at 3:46
A Cache-powered Interner could support this, no?
Original comment by wasserman.louis
on 25 Apr 2012 at 5:51
You can't really have an Interner backed by a Cache, per the Interner contract,
if that Cache might have any eviction policy (besides weakKeys).
Original comment by kevinb@google.com
on 27 Apr 2012 at 2:29
Original comment by kevinb@google.com
on 30 May 2012 at 7:41
Original comment by kevinb@google.com
on 30 May 2012 at 7:45
But this Cache gets created for the Interner, so there's no chance for it
having an unexpected eviction policy, is it?
Original comment by Maaarti...@gmail.com
on 29 Jun 2012 at 9:40
We were at one time considering letting you back an interner with any Cache,
and I think Louis's point is that that would solve this issue too, since you
could call cache.size(). But we're not doing that, so my point is that this
issue is still a valid request. I suspect you want CacheStats for your
interners too.
Original comment by kevinb@google.com
on 30 Jun 2012 at 2:09
This issue has been migrated to GitHub.
It can be found at https://github.com/google/guava/issues/<id>
Original comment by cgdecker@google.com
on 1 Nov 2014 at 4:15
Original comment by cgdecker@google.com
on 1 Nov 2014 at 4:18
Original comment by cgdecker@google.com
on 3 Nov 2014 at 9:10
Original issue reported on code.google.com by
blair-ol...@orcaware.com
on 9 Jun 2010 at 9:21Attachments: