Class RefCountingIndexReader
- java.lang.Object
-
- org.apache.lucene.index.IndexReader
-
- org.apache.lucene.index.FilterIndexReader
-
- org.apache.jackrabbit.core.query.lucene.RefCountingIndexReader
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
,Cloneable
,ReleaseableIndexReader
public class RefCountingIndexReader extends FilterIndexReader implements ReleaseableIndexReader
RefCountingIndexReader
...
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.lucene.index.FilterIndexReader
FilterIndexReader.FilterTermDocs, FilterIndexReader.FilterTermEnum, FilterIndexReader.FilterTermPositions
-
Nested classes/interfaces inherited from class org.apache.lucene.index.IndexReader
IndexReader.ReaderClosedListener
-
-
Field Summary
-
Fields inherited from class org.apache.lucene.index.FilterIndexReader
in
-
Fields inherited from class org.apache.lucene.index.IndexReader
hasChanges
-
-
Constructor Summary
Constructors Constructor Description RefCountingIndexReader(IndexReader in)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
doClose()
FieldInfos
getFieldInfos()
int
getRefCountJr()
IndexReader[]
getSequentialSubReaders()
void
release()
Releases this index reader and potentially frees resources.-
Methods inherited from class org.apache.lucene.index.FilterIndexReader
directory, docFreq, doCommit, document, doDelete, doSetNorm, doUndeleteAll, getCommitUserData, getCoreCacheKey, getDeletesCacheKey, getIndexCommit, getTermFreqVector, getTermFreqVector, getTermFreqVector, getTermFreqVectors, getTermInfosIndexDivisor, getUniqueTermCount, getVersion, hasDeletions, hasNorms, isCurrent, isDeleted, isOptimized, maxDoc, norms, norms, numDocs, termDocs, termDocs, termPositions, terms, terms, toString
-
Methods inherited from class org.apache.lucene.index.IndexReader
acquireWriteLock, addReaderClosedListener, clone, clone, close, commit, commit, decRef, deleteDocument, deleteDocuments, document, doOpenIfChanged, doOpenIfChanged, doOpenIfChanged, doOpenIfChanged, ensureOpen, flush, flush, getCommitUserData, getCurrentVersion, getRefCount, incRef, indexExists, lastModified, listCommits, numDeletedDocs, open, open, open, open, open, open, open, open, open, open, open, openIfChanged, openIfChanged, openIfChanged, openIfChanged, removeReaderClosedListener, reopen, reopen, reopen, reopen, setNorm, setNorm, termPositions, tryIncRef, undeleteAll
-
-
-
-
Constructor Detail
-
RefCountingIndexReader
public RefCountingIndexReader(IndexReader in)
-
-
Method Detail
-
getRefCountJr
public int getRefCountJr()
- Returns:
- the current reference count value.
-
release
public final void release() throws IOException
Releases this index reader and potentially frees resources. In contrast toIndexReader.close()
this method does not necessarily close the index reader, but gives the implementation the opportunity to do reference counting.- Specified by:
release
in interfaceReleaseableIndexReader
- Throws:
IOException
- if an error occurs while releasing the index reader.
-
getSequentialSubReaders
public IndexReader[] getSequentialSubReaders()
- Overrides:
getSequentialSubReaders
in classFilterIndexReader
-
getFieldInfos
public FieldInfos getFieldInfos()
- Overrides:
getFieldInfos
in classFilterIndexReader
-
doClose
protected void doClose() throws IOException
- Overrides:
doClose
in classFilterIndexReader
- Throws:
IOException
-
-