Class InternCache

All Implemented Interfaces:
Serializable, ConcurrentMap<String,String>, Map<String,String>

public final class InternCache extends ConcurrentHashMap<String,String>
Singleton class that adds a simple first-level cache in front of regular String.intern() functionality. This is done as a minor performance optimization, to avoid calling native intern() method in cases where same String is being interned multiple times.
See Also:
  • Field Details

  • Constructor Details

    • InternCache

      public InternCache()
    • InternCache

      public InternCache(int maxSize, float loadFactor, int concurrency)
  • Method Details