Browse Source

HDFS-17701. [FGL] Fix some javadocs (#7256)

ZanderXu 5 tháng trước cách đây
mục cha
commit
2343bd71a9

+ 8 - 2
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/util/RwLock.java

@@ -29,13 +29,16 @@ public interface RwLock {
    */
    */
   void readLock(RwLockMode lockMode);
   void readLock(RwLockMode lockMode);
 
 
-  /** Acquire read lock, unless interrupted while waiting.  */
+  /** Acquire read lock, unless interrupted while waiting.
+   * @throws InterruptedException if the thread is interrupted
+   */
   default void readLockInterruptibly() throws InterruptedException {
   default void readLockInterruptibly() throws InterruptedException {
     readLockInterruptibly(RwLockMode.GLOBAL);
     readLockInterruptibly(RwLockMode.GLOBAL);
   }
   }
 
 
   /** Acquire read lock, unless interrupted while waiting.
   /** Acquire read lock, unless interrupted while waiting.
    * @param lockMode The lock type for acquiring a read lock
    * @param lockMode The lock type for acquiring a read lock
+   * @throws InterruptedException if the thread is interrupted
    */
    */
   void readLockInterruptibly(RwLockMode lockMode) throws InterruptedException;
   void readLockInterruptibly(RwLockMode lockMode) throws InterruptedException;
 
 
@@ -82,13 +85,16 @@ public interface RwLock {
    */
    */
   void writeLock(RwLockMode lockMode);
   void writeLock(RwLockMode lockMode);
   
   
-  /** Acquire write lock, unless interrupted while waiting.  */
+  /** Acquire write lock, unless interrupted while waiting.
+   * @throws InterruptedException if the thread is interrupted
+   */
   default void writeLockInterruptibly() throws InterruptedException {
   default void writeLockInterruptibly() throws InterruptedException {
     writeLockInterruptibly(RwLockMode.GLOBAL);
     writeLockInterruptibly(RwLockMode.GLOBAL);
   }
   }
 
 
   /** Acquire write lock, unless interrupted while waiting.
   /** Acquire write lock, unless interrupted while waiting.
    * @param lockMode The lock type for acquiring a write lock
    * @param lockMode The lock type for acquiring a write lock
+   * @throws InterruptedException if the thread is interrupted
    */
    */
   void writeLockInterruptibly(RwLockMode lockMode) throws InterruptedException;
   void writeLockInterruptibly(RwLockMode lockMode) throws InterruptedException;