public abstract static class Analyzer.ReuseStrategy extends Object implements Closeable
Analyzer.tokenStream(String, java.io.Reader)
.Constructor and Description |
---|
Analyzer.ReuseStrategy()
Sole constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the ReuseStrategy, freeing any resources
|
abstract Analyzer.TokenStreamComponents |
getReusableComponents(String fieldName)
Gets the reusable TokenStreamComponents for the field with the given name
|
protected Object |
getStoredValue()
Returns the currently stored value
|
abstract void |
setReusableComponents(String fieldName,
Analyzer.TokenStreamComponents components)
Stores the given TokenStreamComponents as the reusable components for the
field with the give name
|
protected void |
setStoredValue(Object storedValue)
Sets the stored value
|
public Analyzer.ReuseStrategy()
public abstract Analyzer.TokenStreamComponents getReusableComponents(String fieldName)
fieldName
- Name of the field whose reusable TokenStreamComponents
are to be retrievednull
if there was no previous components for the fieldpublic abstract void setReusableComponents(String fieldName, Analyzer.TokenStreamComponents components)
fieldName
- Name of the field whose TokenStreamComponents are being setcomponents
- TokenStreamComponents which are to be reused for the fieldprotected final Object getStoredValue()
null
if no value is storedAlreadyClosedException
- if the ReuseStrategy is closed.protected final void setStoredValue(Object storedValue)
storedValue
- Value to storeAlreadyClosedException
- if the ReuseStrategy is closed.Copyright © 2000-2012 Apache Software Foundation. All Rights Reserved.