public final class ConcurrentlyMutableAnalyzer extends DelegatingAnalyzerWrapper
Analyzer.ReuseStrategy, Analyzer.TokenStreamComponents
GLOBAL_REUSE_STRATEGY, PER_FIELD_REUSE_STRATEGY
Constructor and Description |
---|
ConcurrentlyMutableAnalyzer(Analyzer initialAnalyzer) |
Modifier and Type | Method and Description |
---|---|
protected Analyzer |
getWrappedAnalyzer(String fieldName) |
boolean |
isCompatibleWith(ScopedAnalyzer analyzer)
Checks if the currently set Analyzer is the same as the
proposed one, in which case there is no need for
replacements or locking.
|
void |
updateAnalyzer(ScopedAnalyzer analyzer)
Correct concurrency control requires external locking!
|
wrapComponents, wrapReader
createComponents, getOffsetGap, getPositionIncrementGap, initReader
close, getReuseStrategy, getVersion, setVersion, tokenStream, tokenStream
public ConcurrentlyMutableAnalyzer(Analyzer initialAnalyzer)
protected Analyzer getWrappedAnalyzer(String fieldName)
getWrappedAnalyzer
in class AnalyzerWrapper
public boolean isCompatibleWith(ScopedAnalyzer analyzer)
analyzer
- the ScopedAnalyzer
to use for comparisonpublic void updateAnalyzer(ScopedAnalyzer analyzer)
analyzer
- the ScopedAnalyzer
to use for lockingCopyright © 2006-2017 Red Hat, Inc. All Rights Reserved