Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google MapMaker maximumSize Beta?

Tags:

java

guava

MapMaker maximumSize in google guava library is marked as @Beta. It's a very useful feature to set the maximum size when you use it as a cache and I would like to use it in production code. From experience with other google products beta can be pretty solid. Anyone know why it's a @Beta?

like image 731
Yuval Rimar Avatar asked Jan 30 '26 23:01

Yuval Rimar


2 Answers

It is used in production at Google and there are no immediate plans on API changes. There is consensus to support weighted entries and we'll likely continue to evolve the algorithm to be closer to ConcurrentLinkedHashMap's. In this case @Beta is just to indicate that the method contract isn't officially set in stone.

like image 160
Ben Manes Avatar answered Feb 01 '26 14:02

Ben Manes


From the javadoc:

Signifies that a public API (public class, method or field) is subject to incompatible changes, or even removal, in a future release. An API bearing this annotation is exempt from any compatibility guarantees made by its containing library.

So it doesn't mean it's questionable quality, or unsuitable for production use, they just reserve the right to change it later.

like image 40
skaffman Avatar answered Feb 01 '26 13:02

skaffman



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!