Class Overview
Simple lockless and memory barrier free String intern cache that is guaranteed
to return the same String instance as String.intern() does.
Summary
Public Methods |
String
|
intern(String s)
Returns a single object instance for each equal string.
|
Public Constructors
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.
|
Public Methods
Returns a single object instance for each equal string.