Author: mduerig
Date: Mon Apr 25 09:13:48 2016
New Revision: 1740779

URL: http://svn.apache.org/viewvc?rev=1740779&view=rev
Log:
OAK-3348: Cross gc sessions might introduce references to pre-compacted segments
Javdoc for WriteOperationHandler

Modified:
    
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/WriteOperationHandler.java

Modified: 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/WriteOperationHandler.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/WriteOperationHandler.java?rev=1740779&r1=1740778&r2=1740779&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/WriteOperationHandler.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-segment-next/src/main/java/org/apache/jackrabbit/oak/segment/WriteOperationHandler.java
 Mon Apr 25 09:13:48 2016
@@ -22,13 +22,42 @@ package org.apache.jackrabbit.oak.segmen
 import java.io.IOException;
 
 /**
- * FIXME OAK-3348 document
+ * A {@code WriteOperationHandler} executes {@link WriteOperation 
WriteOperation}s and as
+ * such serves as a bridge between {@link SegmentWriter} and {@link 
SegmentBufferWriter}.
  */
 interface WriteOperationHandler {
+
+    /**
+     * A {@code WriteOperation} encapsulates an operation on a {@link 
SegmentWriter}.
+     * Executing it performs the actual act of persisting changes to a
+     * {@link SegmentBufferWriter}.
+     */
     interface WriteOperation {
+
+        /**
+         * Persist any changes represented by the {@code WriteOperation} to the
+         * passed {@code writer}.
+         * @param writer  writer which must be used to persist any changes
+         * @return        {@code RecordId} that resulted from persisting the 
changes.
+         * @throws IOException
+         */
         RecordId execute(SegmentBufferWriter writer) throws IOException;
     }
 
+    /**
+     * Execute the passed {@code writeOperation} by passing it a {@link 
SegmentBufferWriter}.
+     * @param writeOperation  {@link WriteOperation} to execute
+     * @return                {@code RecordId} that resulted from persisting 
the changes.
+     * @throws IOException
+     */
     RecordId execute(WriteOperation writeOperation) throws IOException;
+
+    /**
+     * Flush any pending changes on any {@link SegmentBufferWriter} managed by 
this instance.
+     * This method <em>does not block</em> to wait for concurrent write 
operations. However, if
+     * a write operation is currently in progress a call to this method 
ensures the respective
+     * changes are properly flushed at the end of that call.
+     * @throws IOException
+     */
     void flush() throws IOException;
 }


Reply via email to