This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-lang.git
The following commit(s) were added to refs/heads/master by this push:
new 5283344 Added missing Javadoc and tweaked another Javadoc.
5283344 is described below
commit 5283344927583f0894b79ae93515fd27ec5f9180
Author: Gary Gregory <[email protected]>
AuthorDate: Sat Jul 11 17:16:31 2020 -0400
Added missing Javadoc and tweaked another Javadoc.
---
.../lang3/concurrent/locks/LockingVisitors.java | 27 ++++++++++++++++++++--
1 file changed, 25 insertions(+), 2 deletions(-)
diff --git
a/src/main/java/org/apache/commons/lang3/concurrent/locks/LockingVisitors.java
b/src/main/java/org/apache/commons/lang3/concurrent/locks/LockingVisitors.java
index 4663e13..6286873 100644
---
a/src/main/java/org/apache/commons/lang3/concurrent/locks/LockingVisitors.java
+++
b/src/main/java/org/apache/commons/lang3/concurrent/locks/LockingVisitors.java
@@ -82,12 +82,35 @@ public class LockingVisitors {
*/
public static class LockVisitor<O, L> {
+ /**
+ * The lock object, untyped, since, for example {@link StampedLock}
does not implement a locking interface in
+ * Java 8.
+ */
private final L lock;
-
+
+ /**
+ * The guarded object.
+ */
private final O object;
+
+ /**
+ * Supplies the read lock, usually from the lock object.
+ */
private final Supplier<Lock> readLockSupplier;
+
+ /**
+ * Supplies the write lock, usually from the lock object.
+ */
private final Supplier<Lock> writeLockSupplier;
+ /**
+ * Constructs an instance.
+ *
+ * @param object The object to guard.
+ * @param lock The locking object.
+ * @param readLockSupplier Supplies the read lock, usually from the
lock object.
+ * @param writeLockSupplier Supplies the write lock, usually from the
lock object.
+ */
protected LockVisitor(final O object, L lock, Supplier<Lock>
readLockSupplier, Supplier<Lock> writeLockSupplier) {
super();
this.object = Objects.requireNonNull(object, "object");
@@ -210,7 +233,7 @@ public class LockingVisitors {
}
/**
- * Gets the object.
+ * Gets the guarded object.
*
* @return the object.
*/