public class

SimpleStringInterner

extends StringInterner
java.lang.Object
   ↳ org.apache.lucene.util.StringInterner
     ↳ org.apache.lucene.util.SimpleStringInterner

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 Constructors
SimpleStringInterner(int tableSize, int maxChainLength)
Public Methods
String intern(String s)
Returns a single object instance for each equal string.
[Expand]
Inherited Methods
From class org.apache.lucene.util.StringInterner
From class java.lang.Object

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

public String intern (String s)

Returns a single object instance for each equal string.