maidh91 / guava-libraries

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

MapMaker.maximumSize enhancement #483

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I think it would be a good idea if you could specify how items should be 
evicted when using MapMaker.maximumSize().  The javadoc says "the map may evict 
an entry because it hasn't been used recently or very often".  But it would be 
nice if you could specify one policy or another.

Original issue reported on code.google.com by keith.jo...@glebepark.com on 19 Nov 2010 at 4:20

GoogleCodeExporter commented 9 years ago
You can specify the "hasn't been used recently" policy by using 
MapMaker.expireAfterAccess.  I'm not sure that there is a way to specify the 
"very often" policy.

Original comment by boppenh...@google.com on 20 Nov 2010 at 6:28

GoogleCodeExporter commented 9 years ago
I need to retract that.  I must have been half a sleep when I said that.  
MapMaker.expireAfterAccess doesn't change the behavior introduced by 
MapMaker.maximumSize.

Original comment by boppenh...@google.com on 21 Nov 2010 at 6:46

GoogleCodeExporter commented 9 years ago
There are many variations on eviction policies that could be used.  We will be 
studying some of them in the coming quarters.

Original comment by kevinb@google.com on 9 Dec 2010 at 9:20

GoogleCodeExporter commented 9 years ago
I'm closing this issue report.  If a *particular* alternate eviction policy is 
desired and you can provide justification for it, please file that.

Original comment by kevinb@google.com on 12 Jan 2011 at 10:49

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:15

GoogleCodeExporter commented 9 years ago

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