LUCENE-924: small improvements to IndexWriter's javadocs

git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@545751 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael McCandless 2007-06-09 14:31:08 +00:00
parent df0a188415
commit 1a35bbe0b3
1 changed files with 26 additions and 1 deletions

View File

@ -252,7 +252,10 @@ public class IndexWriter {
private boolean closed; private boolean closed;
/** /**
* @throws AlreadyClosedException if this IndexWriter is closed * Used internally to throw an {@link
* AlreadyClosedException} if this IndexWriter has been
* closed.
* @throws AlreadyClosedException if this IndexWriter is
*/ */
protected final void ensureOpen() throws AlreadyClosedException { protected final void ensureOpen() throws AlreadyClosedException {
if (closed) { if (closed) {
@ -644,6 +647,8 @@ public class IndexWriter {
} }
/** /**
* Returns the largest number of documents allowed in a
* single segment.
* @see #setMaxMergeDocs * @see #setMaxMergeDocs
*/ */
public int getMaxMergeDocs() { public int getMaxMergeDocs() {
@ -669,6 +674,8 @@ public class IndexWriter {
} }
/** /**
* Returns the maximum number of terms that will be
* indexed for a single field in a document.
* @see #setMaxFieldLength * @see #setMaxFieldLength
*/ */
public int getMaxFieldLength() { public int getMaxFieldLength() {
@ -694,6 +701,8 @@ public class IndexWriter {
} }
/** /**
* Returns the number of buffered added documents that will
* trigger a flush.
* @see #setMaxBufferedDocs * @see #setMaxBufferedDocs
*/ */
public int getMaxBufferedDocs() { public int getMaxBufferedDocs() {
@ -718,6 +727,8 @@ public class IndexWriter {
} }
/** /**
* Returns the number of buffered deleted terms that will
* trigger a flush.
* @see #setMaxBufferedDeleteTerms * @see #setMaxBufferedDeleteTerms
*/ */
public int getMaxBufferedDeleteTerms() { public int getMaxBufferedDeleteTerms() {
@ -743,6 +754,9 @@ public class IndexWriter {
} }
/** /**
* Returns the number of segments that are merged at once
* and also controls the total number of segments allowed
* to accumulate in the index.
* @see #setMergeFactor * @see #setMergeFactor
*/ */
public int getMergeFactor() { public int getMergeFactor() {
@ -759,6 +773,8 @@ public class IndexWriter {
} }
/** /**
* Returns the current default infoStream for newly
* instantiated IndexWriters.
* @see #setDefaultInfoStream * @see #setDefaultInfoStream
*/ */
public static PrintStream getDefaultInfoStream() { public static PrintStream getDefaultInfoStream() {
@ -776,6 +792,7 @@ public class IndexWriter {
} }
/** /**
* Returns the current infoStream in use by this writer.
* @see #setInfoStream * @see #setInfoStream
*/ */
public PrintStream getInfoStream() { public PrintStream getInfoStream() {
@ -793,6 +810,7 @@ public class IndexWriter {
} }
/** /**
* Returns allowed timeout when acquiring the write lock.
* @see #setWriteLockTimeout * @see #setWriteLockTimeout
*/ */
public long getWriteLockTimeout() { public long getWriteLockTimeout() {
@ -809,6 +827,8 @@ public class IndexWriter {
} }
/** /**
* Returns default write lock timeout for newly
* instantiated IndexWriters.
* @see #setDefaultWriteLockTimeout * @see #setDefaultWriteLockTimeout
*/ */
public static long getDefaultWriteLockTimeout() { public static long getDefaultWriteLockTimeout() {
@ -1695,6 +1715,11 @@ public class IndexWriter {
throws IOException { throws IOException {
} }
/**
* Used internally to trigger a flush if the number of
* buffered added documents or buffered deleted terms are
* large enough.
*/
protected final void maybeFlushRamSegments() throws CorruptIndexException, IOException { protected final void maybeFlushRamSegments() throws CorruptIndexException, IOException {
// A flush is triggered if enough new documents are buffered or // A flush is triggered if enough new documents are buffered or
// if enough delete terms are buffered // if enough delete terms are buffered