diff --git a/README.md b/README.md index 6b083dc3c13251d6f241add2131731d95a0ec15d..4f957a7ad8c8dc2fb85b29ddb133e58c7da8a60f 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,6 @@ +
+
* {@link #lock(LockType, trySupplier, Function, Function)}的无返回变体
- *
- * @param lockType 锁类型
- * @param run 执行的回调
- * @param catchby 进入catch块后的回调,传入当前异常
- * @param finaby 进入finally块后的回调
*/
default
void lock(@NotNull LockType lockType, @NotNull tryRunnable run, @Nullable Consumer
- * {@link #lock(LockType, trySupplier, Function)}的简易变体
- *
- * @param lockType 锁类型
- * @param run 带返回的回调
- * @param
* {@link #lock(LockType, trySupplier, Function)}的无返回变体
- *
- * @param lockType 锁类型
- * @param run 执行的回调
- * @param finaby 进入finally块后的回调
- *
- * @throws Exception 异常类型根据实际运行时回调抛出决定
*/
default
void lock(@NotNull LockType lockType, @NotNull tryRunnable run, @Nullable Runnable finaby) throws Exception {
@@ -123,18 +96,4 @@ interface Lock {
return null;
});
}
-
- /**
- * 使用锁执行指定回调
- *
- * {@link #lock(LockType, tryRunnable, Runnable)}的简易变体
- *
- * @param lockType 锁类型
- * @param run 执行的回调
- *
- * @throws Exception 异常类型根据实际运行时回调抛出决定
- */
- default
- void lock(@NotNull LockType lockType, @NotNull tryRunnable run) throws Exception
- { lock(lockType, run, null); }
}
diff --git a/src/main/java/fybug/nulll/pdconcurrent/i/ReadLock.java b/src/main/java/fybug/nulll/pdconcurrent/i/ReadLock.java
new file mode 100644
index 0000000000000000000000000000000000000000..1824694a640efd5a1b72e203c6109089eabd0b9f
--- /dev/null
+++ b/src/main/java/fybug/nulll/pdconcurrent/i/ReadLock.java
@@ -0,0 +1,60 @@
+package fybug.nulll.pdconcurrent.i;
+import java.util.function.Consumer;
+import java.util.function.Function;
+
+import fybug.nulll.pdconcurrent.e.LockType;
+import fybug.nulll.pdconcurrent.fun.tryRunnable;
+import fybug.nulll.pdconcurrent.fun.trySupplier;
+import fybug.nulll.pdconcurrent.i.simple.LockSimple;
+import jakarta.annotation.Nullable;
+import jakarta.validation.constraints.NotNull;
+
+/**
+ *
+ * {@link #lock(LockType, trySupplier, Function, Function)}指定读锁的变种
+ */
+ default
+
+ * {@link #lock(LockType, tryRunnable, Consumer, Runnable)}指定读锁的变种
+ */
+ default
+ void read(@NotNull tryRunnable run, @Nullable Consumer
+ * {@link #lock(LockType, trySupplier, Function)}指定读锁的变种
+ */
+ default
+
+ * {@link #lock(LockType, tryRunnable, Runnable)}指定读锁的变种
+ */
+ default
+ void read(@NotNull tryRunnable run, @Nullable Runnable finaby) throws Exception
+ { lock(LockType.READ, run, finaby); }
+}
diff --git a/src/main/java/fybug/nulll/pdconcurrent/i/ReadWriteLock.java b/src/main/java/fybug/nulll/pdconcurrent/i/ReadWriteLock.java
deleted file mode 100644
index 63a7d1ea5ad2e3546443f33dd218180566acd366..0000000000000000000000000000000000000000
--- a/src/main/java/fybug/nulll/pdconcurrent/i/ReadWriteLock.java
+++ /dev/null
@@ -1,203 +0,0 @@
-package fybug.nulll.pdconcurrent.i;
-import java.util.function.Consumer;
-import java.util.function.Function;
-
-import fybug.nulll.pdconcurrent.e.LockType;
-import fybug.nulll.pdconcurrent.fun.tryRunnable;
-import fybug.nulll.pdconcurrent.fun.trySupplier;
-import jakarta.annotation.Nullable;
-import jakarta.validation.constraints.NotNull;
-
-/**
- *
- * {@link #lock(LockType, trySupplier, Function, Function)}指定读锁的变种
- *
- * @param run 带返回的回调
- * @param catchby 进入catch块后的回调,传入当前异常
- * @param finaby 进入finally块后的回调,传入前两个回调的返回值
- * @param
- * {@link #lock(LockType, tryRunnable, Consumer, Runnable)}指定读锁的变种
- *
- * @param run 执行的回调
- * @param catchby 进入catch块后的回调,传入当前异常
- * @param finaby 进入finally块后的回调
- */
- default
- void read(@NotNull tryRunnable run, @Nullable Consumer
- * {@link #lock(LockType, trySupplier, Function)}指定读锁的变种
- *
- * @param run 带返回的回调
- * @param finaby 进入finally块后的回调,传入前一个回调的返回值,遇到异常传入{@code null}
- * @param
- * {@link #lock(LockType, trySupplier)}指定读锁的变种
- *
- * @param run 带返回的回调
- * @param
- * {@link #lock(LockType, tryRunnable, Runnable)}指定读锁的变种
- *
- * @param run 执行的回调
- * @param finaby 进入finally块后的回调
- *
- * @throws Exception 异常类型根据实际运行时回调抛出决定
- */
- default
- void read(@NotNull tryRunnable run, @Nullable Runnable finaby) throws Exception
- { lock(LockType.READ, run, finaby); }
-
- /**
- * 使用读锁执行指定回调
- *
- * {@link #lock(LockType, tryRunnable)}指定读锁的变种
- *
- * @param run 执行的回调
- *
- * @throws Exception 异常类型根据实际运行时回调抛出决定
- */
- default
- void read(@NotNull tryRunnable run) throws Exception
- { lock(LockType.READ, run); }
-
-
- /**
- * 使用写锁执行指定回调
- *
- * {@link #lock(LockType, trySupplier, Function, Function)}指定写锁的变种
- *
- * @param run 带返回的回调
- * @param catchby 进入catch块后的回调,传入当前异常
- * @param finaby 进入finally块后的回调,传入前两个回调的返回值
- * @param
- * {@link #lock(LockType, tryRunnable, Consumer, Runnable)}指定写锁的变种
- *
- * @param run 执行的回调
- * @param catchby 进入catch块后的回调,传入当前异常
- * @param finaby 进入finally块后的回调
- */
- default
- void write(@NotNull tryRunnable run, @Nullable Consumer
- * {@link #lock(LockType, trySupplier, Function)}指定写锁的变种
- *
- * @param run 带返回的回调
- * @param finaby 进入finally块后的回调,传入前一个回调的返回值,遇到异常传入{@code null}
- * @param
- * {@link #lock(LockType, trySupplier)}指定写锁的变种
- *
- * @param run 带返回的回调
- * @param
- * {@link #lock(LockType, tryRunnable, Runnable)}指定写锁的变种
- *
- * @param run 执行的回调
- * @param finaby 进入finally块后的回调
- *
- * @throws Exception 异常类型根据实际运行时回调抛出决定
- */
- default
- void write(@NotNull tryRunnable run, @Nullable Runnable finaby) throws Exception
- { lock(LockType.WRITE, run, finaby); }
-
- /**
- * 使用写锁执行指定回调
- *
- * {@link #lock(LockType, tryRunnable)}指定写锁的变种
- *
- * @param run 执行的回调
- *
- * @throws Exception 异常类型根据实际运行时回调抛出决定
- */
- default
- void write(@NotNull tryRunnable run) throws Exception
- { lock(LockType.WRITE, run); }
-}
diff --git a/src/main/java/fybug/nulll/pdconcurrent/i/TryLock.java b/src/main/java/fybug/nulll/pdconcurrent/i/TryLock.java
index b6d120fe914bdeb39884f50aa0b64e8ebb76545e..73c60439b441914f200db03fcd56c62d1d341a51 100644
--- a/src/main/java/fybug/nulll/pdconcurrent/i/TryLock.java
+++ b/src/main/java/fybug/nulll/pdconcurrent/i/TryLock.java
@@ -14,9 +14,10 @@ import jakarta.validation.constraints.NotNull;
* {@link Lock}的拓展,增加{@code trylock()}类方法用于适配需要立刻判断是否获取到锁并即刻往下执行的情况
*
* @author fybug
- * @version 0.0.1
+ * @version 0.0.2
* @since i 0.0.1
*/
+public
interface TryLock {
/**
* 尝试使用锁执行指定回调
@@ -44,11 +45,6 @@ interface TryLock {
* 尝试使用锁执行指定回调
*
* {@link #trylock(LockType, tryFunction, Function, Function)}的无返回变体
- *
- * @param lockType 锁类型
- * @param run 执行的回调,传入参数是否获取到锁
- * @param catchby 进入catch块后的回调,传入当前异常
- * @param finaby 进入finally块后的回调
*/
default
void trylock(@NotNull LockType lockType, @NotNull tryConsumer
- * {@link #trylock(LockType, tryFunction, Function)}的简易变体
- *
- * @param lockType 锁类型
- * @param run 带返回的回调,传入参数是否获取到锁
- * @param
* {@link #trylock(LockType, tryFunction, Function)}的无返回变体
- *
- * @param lockType 锁类型
- * @param run 执行的回调,传入参数是否获取到锁
- * @param finaby 进入finally块后的回调
- *
- * @throws Exception 异常类型根据实际运行时回调抛出决定
*/
default
void trylock(@NotNull LockType lockType, @NotNull tryConsumer
- * {@link #trylock(LockType, tryConsumer, Runnable)}的简易变体
- *
- * @param lockType 锁类型
- * @param run 带返回的回调,传入参数是否获取到锁
- *
- * @throws Exception 异常类型根据实际运行时回调抛出决定
- */
- default
- void trylock(@NotNull LockType lockType, @NotNull tryConsumer
+ * {@link #trylock(LockType, tryFunction, Function, Function)}指定读锁的变种
+ */
+ default
+
+ * {@link #trylock(LockType, tryConsumer, Consumer, Runnable)}指定读锁的变种
+ */
+ default
+ void tryread(@NotNull tryConsumer
+ * {@link #trylock(LockType, tryFunction, Function)}指定读锁的变种
+ */
+ default
+
+ * {@link #trylock(LockType, tryConsumer, Runnable)}指定读锁的变种
+ */
+ default
+ void tryread(@NotNull tryConsumer
- * {@link #trylock(LockType, tryFunction, Function, Function)}指定读锁的变种
- *
- * @param run 带返回的回调,传入参数是否获取到锁
- * @param catchby 进入catch块后的回调,传入当前异常
- * @param finaby 进入finally块后的回调,传入前两个回调的返回值
- * @param
- * {@link #trylock(LockType, tryConsumer, Consumer, Runnable)}指定读锁的变种
- *
- * @param run 执行的回调,传入参数是否获取到锁
- * @param catchby 进入catch块后的回调,传入当前异常
- * @param finaby 进入finally块后的回调
- */
- default
- void tryread(@NotNull tryConsumer
- * {@link #trylock(LockType, tryFunction, Function)}指定读锁的变种
- *
- * @param run 带返回的回调,传入参数是否获取到锁
- * @param finaby 进入finally块后的回调,传入前两个回调的返回值,遇到异常传入{@code null}
- * @param
- * {@link #trylock(LockType, tryFunction)}指定读锁的变种
- *
- * @param run 带返回的回调,传入参数是否获取到锁
- * @param
- * {@link #trylock(LockType, tryConsumer, Runnable)}指定读锁的变种
- *
- * @param run 执行的回调,传入参数是否获取到锁
- * @param finaby 进入finally块后的回调
- *
- * @throws Exception 异常类型根据实际运行时回调抛出决定
- */
- default
- void tryread(@NotNull tryConsumer
- * {@link #trylock(LockType, tryConsumer)}指定读锁的变种
- *
- * @param run 带返回的回调,传入参数是否获取到锁
- *
- * @throws Exception 异常类型根据实际运行时回调抛出决定
- */
- default
- void tryread(@NotNull tryConsumer
- * {@link #trylock(LockType, tryFunction, Function, Function)}指定写锁的变种
- *
- * @param run 带返回的回调,传入参数是否获取到锁
- * @param catchby 进入catch块后的回调,传入当前异常
- * @param finaby 进入finally块后的回调,传入前两个回调的返回值
- * @param
- * {@link #trylock(LockType, tryConsumer, Consumer, Runnable)}指定写锁的变种
- *
- * @param run 执行的回调,传入参数是否获取到锁
- * @param catchby 进入catch块后的回调,传入当前异常
- * @param finaby 进入finally块后的回调
- */
- default
- void trywrite(@NotNull tryConsumer
- * {@link #trylock(LockType, tryFunction, Function)}指定写锁的变种
- *
- * @param run 带返回的回调,传入参数是否获取到锁
- * @param finaby 进入finally块后的回调,传入前两个回调的返回值,遇到异常传入{@code null}
- * @param
- * {@link #trylock(LockType, tryFunction)}指定写锁的变种
- *
- * @param run 带返回的回调,传入参数是否获取到锁
- * @param
- * {@link #trylock(LockType, tryConsumer, Runnable)}指定写锁的变种
- *
- * @param run 执行的回调,传入参数是否获取到锁
- * @param finaby 进入finally块后的回调
- *
- * @throws Exception 异常类型根据实际运行时回调抛出决定
- */
- default
- void trywrite(@NotNull tryConsumer
- * {@link #trylock(LockType, tryConsumer)}指定写锁的变种
- *
- * @param run 带返回的回调,传入参数是否获取到锁
- *
- * @throws Exception 异常类型根据实际运行时回调抛出决定
- */
- default
- void trywrite(@NotNull tryConsumer
+ * {@link #trylock(LockType, tryFunction, Function, Function)}指定写锁的变种
+ */
+ default
+
+ * {@link #trylock(LockType, tryConsumer, Consumer, Runnable)}指定写锁的变种
+ */
+ default
+ void trywrite(@NotNull tryConsumer
+ * {@link #trylock(LockType, tryFunction, Function)}指定写锁的变种
+ */
+ default
+
+ * {@link #trylock(LockType, tryConsumer, Runnable)}指定写锁的变种
+ */
+ default
+ void trywrite(@NotNull tryConsumer
+ * {@link #lock(LockType, trySupplier, Function, Function)}指定写锁的变种
+ */
+ default
+
+ * {@link #lock(LockType, tryRunnable, Consumer, Runnable)}指定写锁的变种
+ */
+ default
+ void write(@NotNull tryRunnable run, @Nullable Consumer
+ * {@link #lock(LockType, trySupplier, Function)}指定写锁的变种
+ */
+ default
+
+ * {@link #lock(LockType, tryRunnable, Runnable)}指定写锁的变种
+ */
+ default
+ void write(@NotNull tryRunnable run, @Nullable Runnable finaby) throws Exception
+ { lock(LockType.WRITE, run, finaby); }
+}
diff --git a/src/main/java/fybug/nulll/pdconcurrent/i/package-info.java b/src/main/java/fybug/nulll/pdconcurrent/i/package-info.java
index 6ced81b027b2698770bcba5df855e639b3fa8731..04495588a4792675defc03937e02c2f636fa6f77 100644
--- a/src/main/java/fybug/nulll/pdconcurrent/i/package-info.java
+++ b/src/main/java/fybug/nulll/pdconcurrent/i/package-info.java
@@ -3,7 +3,7 @@
* 提供基础功能接口与部分功能框架实现
*
* @author fybug
- * @version 0.0.1
+ * @version 0.0.2
* @since PDConcurrent 0.1.2
*/
package fybug.nulll.pdconcurrent.i;
\ No newline at end of file
diff --git a/src/main/java/fybug/nulll/pdconcurrent/i/simple/LockSimple.java b/src/main/java/fybug/nulll/pdconcurrent/i/simple/LockSimple.java
new file mode 100644
index 0000000000000000000000000000000000000000..639d29128f3d0768b76afeb68331e77e4510d902
--- /dev/null
+++ b/src/main/java/fybug/nulll/pdconcurrent/i/simple/LockSimple.java
@@ -0,0 +1,36 @@
+package fybug.nulll.pdconcurrent.i.simple;
+import java.util.function.Function;
+
+import fybug.nulll.pdconcurrent.e.LockType;
+import fybug.nulll.pdconcurrent.fun.tryRunnable;
+import fybug.nulll.pdconcurrent.fun.trySupplier;
+import fybug.nulll.pdconcurrent.i.Lock;
+import jakarta.validation.constraints.NotNull;
+
+/**
+ *
+ * {@link #lock(LockType, trySupplier, Function)}的简易变体
+ */
+ default
+
+ * {@link #lock(LockType, tryRunnable, Runnable)}的简易变体
+ */
+ default
+ void lock(@NotNull LockType lockType, @NotNull tryRunnable run) throws Exception
+ { lock(lockType, run, null); }
+}
diff --git a/src/main/java/fybug/nulll/pdconcurrent/i/simple/ReadLockSimple.java b/src/main/java/fybug/nulll/pdconcurrent/i/simple/ReadLockSimple.java
new file mode 100644
index 0000000000000000000000000000000000000000..8515240bb3d6d1b4a02e49dc173c987cd3d1fa37
--- /dev/null
+++ b/src/main/java/fybug/nulll/pdconcurrent/i/simple/ReadLockSimple.java
@@ -0,0 +1,35 @@
+package fybug.nulll.pdconcurrent.i.simple;
+import fybug.nulll.pdconcurrent.e.LockType;
+import fybug.nulll.pdconcurrent.fun.tryRunnable;
+import fybug.nulll.pdconcurrent.fun.trySupplier;
+import fybug.nulll.pdconcurrent.i.ReadLock;
+import jakarta.validation.constraints.NotNull;
+
+/**
+ *
+ * {@link #lock(LockType, trySupplier)}指定读锁的变种
+ */
+ default
+
+ * {@link #lock(LockType, tryRunnable)}指定读锁的变种
+ */
+ default
+ void read(@NotNull tryRunnable run) throws Exception
+ { lock(LockType.READ, run); }
+}
diff --git a/src/main/java/fybug/nulll/pdconcurrent/i/simple/TryLockSimple.java b/src/main/java/fybug/nulll/pdconcurrent/i/simple/TryLockSimple.java
new file mode 100644
index 0000000000000000000000000000000000000000..8e8976a9ebeeb6629fa9304703166a2ffaec369d
--- /dev/null
+++ b/src/main/java/fybug/nulll/pdconcurrent/i/simple/TryLockSimple.java
@@ -0,0 +1,36 @@
+package fybug.nulll.pdconcurrent.i.simple;
+import java.util.function.Function;
+
+import fybug.nulll.pdconcurrent.e.LockType;
+import fybug.nulll.pdconcurrent.fun.tryConsumer;
+import fybug.nulll.pdconcurrent.fun.tryFunction;
+import fybug.nulll.pdconcurrent.i.TryLock;
+import jakarta.validation.constraints.NotNull;
+
+/**
+ *
+ * {@link #trylock(LockType, tryFunction, Function)}的简易变体
+ */
+ default
+
+ * {@link #trylock(LockType, tryConsumer, Runnable)}的简易变体
+ */
+ default
+ void trylock(@NotNull LockType lockType, @NotNull tryConsumer
+ * {@link #trylock(LockType, tryFunction)}指定读锁的变种
+ */
+ default
+
+ * {@link #trylock(LockType, tryConsumer)}指定读锁的变种
+ */
+ default
+ void tryread(@NotNull tryConsumer
+ * {@link #trylock(LockType, tryFunction)}指定写锁的变种
+ */
+ default
+
+ * {@link #trylock(LockType, tryConsumer)}指定写锁的变种
+ */
+ default
+ void trywrite(@NotNull tryConsumer
+ * {@link #lock(LockType, trySupplier)}指定写锁的变种
+ */
+ default
+
+ * {@link #lock(LockType, tryRunnable)}指定写锁的变种
+ */
+ default
+ void write(@NotNull tryRunnable run) throws Exception
+ { lock(LockType.WRITE, run); }
+}
diff --git a/src/main/java/fybug/nulll/pdconcurrent/i/simple/package-info.java b/src/main/java/fybug/nulll/pdconcurrent/i/simple/package-info.java
new file mode 100644
index 0000000000000000000000000000000000000000..9b0b93ad4af265099b33ecb2420c63383e108b69
--- /dev/null
+++ b/src/main/java/fybug/nulll/pdconcurrent/i/simple/package-info.java
@@ -0,0 +1,9 @@
+/**
+ * 并发管理读锁支持拓展.
+ * {@link Lock}的拓展,增加 {@code read()} 类方法用于隐藏 {@link LockType} 参数
+ *
+ * @author fybug
+ * @version 0.0.1
+ * @see LockType#READ
+ * @see Lock
+ * @since i 0.0.2
+ */
+@SuppressWarnings("unused")
+public
+interface ReadLock extends LockSimple {
+ /**
+ * 使用读锁执行指定回调
+ * 并发管理读写支持拓展.
- * {@link Lock}的拓展,增加{@code read()}、{@code write()}类方法用于隐藏{@link LockType}参数
- *
- * @author fybug
- * @version 0.0.1
- * @see LockType#READ
- * @see LockType#WRITE
- * @see Lock
- * @since i 0.0.1
- */
-@SuppressWarnings("unused")
-public
-interface ReadWriteLock extends Lock {
- /**
- * 使用读锁执行指定回调
- * TryLock 读锁支持拓展.
+ * {@link TryLock}的拓展,增加 {@code tryread()} 类方法用于隐藏 {@link LockType} 参数
+ *
+ * @author fybug
+ * @version 0.0.1
+ * @see LockType#READ
+ * @see TryLock
+ * @since i 0.0.2
+ */
+@SuppressWarnings("unused")
+public
+interface TryReadLock extends TryLockSimple {
+ /**
+ * 尝试使用读锁执行指定回调
+ * TryLock 读写支持拓展.
- * {@link TryLock}的拓展,增加{@code tryread()}、{@code trywrite()}类方法用于隐藏{@link LockType}参数
- *
- * @author fybug
- * @version 0.0.1
- * @see LockType#READ
- * @see LockType#WRITE
- * @see TryLock
- * @since i 0.0.1
- */
-@SuppressWarnings("unused")
-public
-interface TryReadWriteLock extends TryLock {
- /**
- * 尝试使用读锁执行指定回调
- * TryLock 写锁支持拓展.
+ * {@link TryLock}的拓展,增加 {@code trywrite()} 类方法用于隐藏 {@link LockType} 参数
+ *
+ * @author fybug
+ * @version 0.0.1
+ * @see LockType#WRITE
+ * @see TryLock
+ * @since i 0.0.2
+ */
+@SuppressWarnings("unused")
+public
+interface TryWriteLock extends TryLockSimple {
+ /**
+ * 尝试使用写锁执行指定回调
+ * 并发管理写锁支持拓展.
+ * {@link Lock}的拓展,增加 {@code write()} 类方法用于隐藏 {@link LockType} 参数
+ *
+ * @author fybug
+ * @version 0.0.1
+ * @see LockType#WRITE
+ * @see Lock
+ * @since i 0.0.2
+ */
+@SuppressWarnings("unused")
+public
+interface WriteLock extends LockSimple {
+ /**
+ * 使用写锁执行指定回调
+ * 基础锁管理简易拓展.
+ *
+ * @author fybug
+ * @version 0.0.1
+ * @since simple 0.0.1
+ */
+public
+interface LockSimple extends Lock {
+ /**
+ * 使用锁执行指定回调
+ * 并发读锁支持简易拓展.
+ *
+ * @author fybug
+ * @version 0.0.1
+ * @since simple 0.0.1
+ */
+@SuppressWarnings("unused")
+public
+interface ReadLockSimple extends ReadLock {
+ /**
+ * 使用读锁执行指定回调
+ * TryLock 简易拓展.
+ *
+ * @author fybug
+ * @version 0.0.1
+ * @since simple 0.0.1
+ */
+public
+interface TryLockSimple extends TryLock {
+ /**
+ * 尝试使用锁执行指定回调
+ * TryLock 读锁支持简易拓展.
+ *
+ * @author fybug
+ * @version 0.0.1
+ * @since simple 0.0.1
+ */
+@SuppressWarnings("unused")
+public
+interface TryReadLockSimple extends TryReadLock {
+ /**
+ * 尝试使用读锁执行指定回调
+ * TryLock 写锁支持简易拓展.
+ *
+ * @author fybug
+ * @version 0.0.1
+ * @since simple 0.0.1
+ */
+@SuppressWarnings("unused")
+public
+interface TryWriteLockSimple extends TryWriteLock {
+ /**
+ * 尝试使用写锁执行指定回调
+ * 并发写锁支持简易拓展.
+ *
+ * @author fybug
+ * @version 0.0.1
+ * @since simple 0.0.1
+ */
+@SuppressWarnings("unused")
+public
+interface WriteLockSimple extends WriteLock {
+ /**
+ * 使用写锁执行指定回调
+ * 接口简易拓展包.
+ * 提供部分方法简易变体的拓展接口
+ *
+ * @author fybug
+ * @version 0.0.1
+ * @since PDConcurrent 0.1.3
+ */
+package fybug.nulll.pdconcurrent.i.simple;
\ No newline at end of file
diff --git a/src/main/java/fybug/nulll/pdconcurrent/lock/RWLock.java b/src/main/java/fybug/nulll/pdconcurrent/lock/RWLock.java
index ea25e360c859acb7df248d5ad048cc29df67929b..4845fad60ecad33f42598af791d411c4577a9803 100644
--- a/src/main/java/fybug/nulll/pdconcurrent/lock/RWLock.java
+++ b/src/main/java/fybug/nulll/pdconcurrent/lock/RWLock.java
@@ -195,7 +195,7 @@ class RWLock extends AbstractSyLock {
// 更新对应锁计数
if ( lockType == LockType.READ )
READ_LOCK_COUNTER.getAndIncrement();
- else //noinspection ConstantValue
+ else // noinspection ConstantValue
if ( lockType == LockType.WRITE )
WRITE_LOCK_COUNTER.getAndIncrement();
} else if ( l.isEmpty() ) {
diff --git a/src/main/java/fybug/nulll/pdconcurrent/package-info.java b/src/main/java/fybug/nulll/pdconcurrent/package-info.java
index bcd81f6be4c25d43de5dcef4982a99802c4e0583..53f2a469ed36b9c03df91291bdff9d5e9a9b82fa 100644
--- a/src/main/java/fybug/nulll/pdconcurrent/package-info.java
+++ b/src/main/java/fybug/nulll/pdconcurrent/package-info.java
@@ -5,7 +5,7 @@
* 附带{@code try***}的功能接口包{@link fybug.nulll.pdconcurrent.fun},在java原有的功能接口的基础上允许抛出异常
*
* @author fybug
- * @version 0.1.2
+ * @version 0.1.3
* @since JDK 23+
*/
package fybug.nulll.pdconcurrent;
\ No newline at end of file