mirror of https://github.com/apache/lucene.git
add javadocs to IR.doOpenIfChanged()
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1197000 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
23de4c514b
commit
687c056fb0
|
@ -668,18 +668,42 @@ public abstract class IndexReader implements Cloneable,Closeable {
|
|||
return newReader;
|
||||
}
|
||||
|
||||
/**
|
||||
* If the index has changed since it was opened, open and return a new reader;
|
||||
* else, return {@code null}.
|
||||
*
|
||||
* @see #openIfChanged(IndexReader)
|
||||
*/
|
||||
protected IndexReader doOpenIfChanged() throws CorruptIndexException, IOException {
|
||||
throw new UnsupportedOperationException("This reader does not support reopen().");
|
||||
}
|
||||
|
||||
/**
|
||||
* If the index has changed since it was opened, open and return a new reader;
|
||||
* else, return {@code null}.
|
||||
*
|
||||
* @see #openIfChanged(IndexReader, boolean)
|
||||
*/
|
||||
protected IndexReader doOpenIfChanged(boolean openReadOnly) throws CorruptIndexException, IOException {
|
||||
throw new UnsupportedOperationException("This reader does not support reopen().");
|
||||
}
|
||||
|
||||
/**
|
||||
* If the index has changed since it was opened, open and return a new reader;
|
||||
* else, return {@code null}.
|
||||
*
|
||||
* @see #openIfChanged(IndexReader, IndexCommit)
|
||||
*/
|
||||
protected IndexReader doOpenIfChanged(final IndexCommit commit) throws CorruptIndexException, IOException {
|
||||
throw new UnsupportedOperationException("This reader does not support reopen(IndexCommit).");
|
||||
}
|
||||
|
||||
/**
|
||||
* If the index has changed since it was opened, open and return a new reader;
|
||||
* else, return {@code null}.
|
||||
*
|
||||
* @see #openIfChanged(IndexReader, IndexWriter, boolean)
|
||||
*/
|
||||
protected IndexReader doOpenIfChanged(IndexWriter writer, boolean applyAllDeletes) throws CorruptIndexException, IOException {
|
||||
return writer.getReader(applyAllDeletes);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue