Class FastStringPool

java.lang.Object
org.apache.hadoop.hbase.util.FastStringPool

@Private public class FastStringPool extends Object
A string pool like String.intern(), but more flexible as we can create multiple instances and use them in difference places, where String.intern() is global.

We use WeakReference so when there are no actual reference to the String, it will be GCed to reduce memory pressure.

The difference between WeakObjectPool is that, we also need to use WeakReference as key, not only value, because the key(a String) is exactly what we want to deduplicate.