kgislsompo / guava-libraries

Automatically exported from code.google.com/p/guava-libraries
Apache License 2.0
0 stars 0 forks source link

MIssing MultimapMaker / expand functionality for MapMaker #142

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
currently i use MapMaker to create short-lived caches within a hibernate
session, like 

           public static Map<Session,List<Person>> personCache = new
MapMaker().weakKeys().makeMap();

the whole point of Multimaps are to get rid of constructs like the one above. 

if possible a .makeMultimap() Method should create a Mutable Multimap with
the given features, or alternatively, a new MultimapMaker() class that
mimics the MapMaker. such a builder should have identical semantics.

see also:
http://stackoverflow.com/questions/737060/create-weak-multimap-with-google-colle
ctions

Original issue reported on code.google.com by heroldsi...@googlemail.com on 10 Apr 2009 at 10:10

GoogleCodeExporter commented 9 years ago

Original comment by kevin...@gmail.com on 17 Sep 2009 at 5:57

GoogleCodeExporter commented 9 years ago

Original comment by kevin...@gmail.com on 17 Sep 2009 at 6:02

GoogleCodeExporter commented 9 years ago

Original comment by kevinb@google.com on 30 Jul 2010 at 3:53

GoogleCodeExporter commented 9 years ago

Original comment by fry@google.com on 26 Jan 2011 at 9:56

GoogleCodeExporter commented 9 years ago

Original comment by kevinb@google.com on 13 Jul 2011 at 6:18

GoogleCodeExporter commented 9 years ago

Original comment by fry@google.com on 10 Dec 2011 at 3:37

GoogleCodeExporter commented 9 years ago

Original comment by fry@google.com on 16 Feb 2012 at 7:17

GoogleCodeExporter commented 9 years ago
Based on the migration to Cache, and the now-reduced role of MapMaker, is there 
still interest in a MultimapMaker...or do people want to demand MultiCache?

Original comment by wasserman.louis on 23 Feb 2012 at 7:21

GoogleCodeExporter commented 9 years ago
The request in this issue would be satisfied by adding .makeMultimap() which 
sounds reasonable to me. I don't think we want MultiCache.

Original comment by fry@google.com on 23 Feb 2012 at 7:41

GoogleCodeExporter commented 9 years ago
(I agree that we don't want MultiCache.)

I suspect, however, that the current Multimap implementation would choke on 
weakly referenced value collections.  This may require some work...?

Original comment by wasserman.louis on 23 Feb 2012 at 8:03

GoogleCodeExporter commented 9 years ago
Yes, it would take a lot of work; also, the Maps produced are concurrent, but 
designing a good concurrent multimap is difficult without making a lot of 
assumptions about usage patterns that we don't have much basis for.

Original comment by kevinb@google.com on 24 Feb 2012 at 9:13

GoogleCodeExporter commented 9 years ago

Original comment by kevinb@google.com on 30 May 2012 at 7:43

GoogleCodeExporter commented 9 years ago

Original comment by kevinb@google.com on 22 Jun 2012 at 6:16

GoogleCodeExporter commented 9 years ago
We don't feel this is an area we will be looking into in the foreseeable future.

Original comment by kevinb@google.com on 12 Mar 2013 at 6:25

GoogleCodeExporter commented 9 years ago
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:16

GoogleCodeExporter commented 9 years ago

Original comment by cgdecker@google.com on 3 Nov 2014 at 9:10