|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.lucene.util.StringInterner
org.apache.lucene.util.SimpleStringInterner
public class SimpleStringInterner
Simple lockless and memory barrier free String intern cache that is guaranteed to return the same String instance as String.intern() does.
| Constructor Summary | |
|---|---|
SimpleStringInterner(int tableSize,
int maxChainLength)
|
|
| Method Summary | |
|---|---|
java.lang.String |
intern(java.lang.String s)
Returns a single object instance for each equal string. |
| Methods inherited from class org.apache.lucene.util.StringInterner |
|---|
intern |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SimpleStringInterner(int tableSize,
int maxChainLength)
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.| Method Detail |
|---|
public java.lang.String intern(java.lang.String s)
StringInterner
intern in class StringInterner
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||