You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by si...@apache.org on 2012/08/16 21:38:38 UTC

svn commit: r1374005 - in /lucene/dev/branches/branch_4x: ./ lucene/ lucene/core/ lucene/core/src/java/org/apache/lucene/index/SortedBytesMergeUtils.java

Author: simonw
Date: Thu Aug 16 19:38:38 2012
New Revision: 1374005

URL: http://svn.apache.org/viewvc?rev=1374005&view=rev
Log:
added javadocs to SortedBytesMergeUtils public inner classes

Modified:
    lucene/dev/branches/branch_4x/   (props changed)
    lucene/dev/branches/branch_4x/lucene/   (props changed)
    lucene/dev/branches/branch_4x/lucene/core/   (props changed)
    lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/index/SortedBytesMergeUtils.java

Modified: lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/index/SortedBytesMergeUtils.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/index/SortedBytesMergeUtils.java?rev=1374005&r1=1374004&r2=1374005&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/index/SortedBytesMergeUtils.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/index/SortedBytesMergeUtils.java Thu Aug 16 19:38:38 2012
@@ -179,10 +179,36 @@ public final class SortedBytesMergeUtils
     return merger.currentOrd;
   }
   
+  /**
+   * Implementation of this interface consume the merged bytes with their
+   * corresponding ordinal and byte offset. The offset is the byte offset in
+   * target sorted source where the currently merged {@link BytesRef} instance
+   * should be stored at.
+   */
   public static interface BytesRefConsumer {
+    
+    /**
+     * Consumes a single {@link BytesRef}. The provided {@link BytesRef}
+     * instances are strictly increasing with respect to the used
+     * {@link Comparator} used for merging
+     * 
+     * @param ref
+     *          the {@link BytesRef} to consume
+     * @param ord
+     *          the ordinal of the given {@link BytesRef} in the merge target
+     * @param offset
+     *          the byte offset of the given {@link BytesRef} in the merge
+     *          target
+     * @throws IOException
+     *           if an {@link IOException} occurs
+     */
     public void consume(BytesRef ref, int ord, long offset) throws IOException;
   }
   
+  /**
+   * A simple {@link BytesRefConsumer} that writes the merged {@link BytesRef}
+   * instances sequentially to an {@link IndexOutput}.
+   */
   public static final class IndexOutputBytesRefConsumer implements BytesRefConsumer {
     private final IndexOutput datOut;