Class SimpleStringInterner


  • public class SimpleStringInterner
    extends StringInterner
    Simple lockless and memory barrier free String intern cache that is guaranteed to return the same String instance as String.intern() does.
    NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.
    • Constructor Detail

      • SimpleStringInterner

        public SimpleStringInterner​(int tableSize,
                                    int maxChainLength)
        Parameters:
        tableSize - Size of the hash table, should be a power of two.
        maxChainLength - Maximum length of each bucket, after which the oldest item inserted is dropped.