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:
Shai Erera 2011-11-03 08:51:28 +00:00
parent 23de4c514b
commit 687c056fb0
1 changed files with 24 additions and 0 deletions

View File

@ -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);
}