rpuch commented on code in PR #1246:
URL: https://github.com/apache/ignite-3/pull/1246#discussion_r1005733940


##########
modules/core/src/main/java/org/apache/ignite/internal/lock/ReusableLockLockup.java:
##########
@@ -29,15 +29,20 @@
 public class ReusableLockLockup implements AutoLockup {
     private final Lock lock;
 
-    public ReusableLockLockup(Lock lock) {
+    private ReusableLockLockup(Lock lock) {
         this.lock = lock;
     }
 
+    public static ReusableLockLockup forLock(Lock lock) {

Review Comment:
   `new ReusableLockLockup(lock)` is confusing because the reader might get an 
impression that the lock is actually acquired. I switched to a static method to 
have ability to specify with method name that it's not acquired here. Probably 
`forLock()` is not sufficient here.
   
   How about `bind()`? This would give a hint that we just wrap the lock, 
without acquiring it.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to