Author: mduerig
Date: Mon Jun 13 06:40:53 2016
New Revision: 1748091

URL: http://svn.apache.org/viewvc?rev=1748091&view=rev
Log:
@Trivial: Javadoc improvements

Modified:
    
jackrabbit/oak/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/Revisions.java
    
jackrabbit/oak/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/file/TarRevisions.java

Modified: 
jackrabbit/oak/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/Revisions.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/Revisions.java?rev=1748091&r1=1748090&r2=1748091&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/Revisions.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/Revisions.java
 Mon Jun 13 06:40:53 2016
@@ -52,7 +52,11 @@ public interface Revisions {
      * Atomically set the record id of the current head state to the
      * given {@code head} state if the current head state matches
      * the {@code expected} value.
+     * <p>
      * All record ids must be valid ids for {@code SegmentNodeState}s.
+     * <p>
+     * The locking behaviour of this method regarding implementation
+     * specific.
      *
      * @param expected  the expected head for the update to take place
      * @param head      the new head to update to
@@ -68,8 +72,11 @@ public interface Revisions {
      * Atomically set the record id of the current head state to the value
      * returned from the {@code newHead} function when called with the record
      * id of the current head.
-     * The behaviour of this function regarding locking and handling
-     * {@code null}s returned by {@code newHead} is implementation specific.
+     * <p>
+     * All record ids must be valid ids for {@code SegmentNodeState}s.
+     * <p>
+     * The behaviour of this method regarding locking and handling
+     * {@code null} values returned by {@code newHead} is implementation 
specific.
      *
      * @param newHead  function mapping an record id to the record id to which
      *                 the current head id should be set.

Modified: 
jackrabbit/oak/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/file/TarRevisions.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/file/TarRevisions.java?rev=1748091&r1=1748090&r2=1748091&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/file/TarRevisions.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/file/TarRevisions.java
 Mon Jun 13 06:40:53 2016
@@ -223,6 +223,13 @@ public class TarRevisions implements Rev
         return head.get();
     }
 
+    /**
+     * This implementation blocks if a concurrent call to
+     * {@link #setHead(Function, Option...)} is already in
+     * progress.
+
+     * @param options   none
+     */
     @Override
     public boolean setHead(
             @Nonnull RecordId expected,
@@ -241,10 +248,13 @@ public class TarRevisions implements Rev
     /**
      * This implementation blocks if a concurrent call is already in progress.
      * @param newHead  function mapping an record id to the record id to which
-     *                 the current head id should be set.
+     *                 the current head id should be set. If it returns
+     *                 {@code null} the head remains unchanged and {@code 
setHead}
+     *                 returns {@code false}.
+
      * @param options  zero or one timeout options specifying how long to block
-     * @return
      * @throws InterruptedException
+     * @throws IllegalArgumentException  on any non recognised {@code option}.
      * @see #timeout(long, TimeUnit)
      * @see #INFINITY
      */


Reply via email to