EdColeman commented on a change in pull request #1972:
URL: https://github.com/apache/accumulo/pull/1972#discussion_r595416628



##########
File path: 
core/src/main/java/org/apache/accumulo/fate/zookeeper/ZooQueueLock.java
##########
@@ -42,6 +42,19 @@
   private String path;
   private boolean ephemeral;
 
+  public static class FateLockPath {
+    private final String path;
+
+    public FateLockPath(String path) {
+      this.path = path;
+    }
+
+    @Override

Review comment:
       Probably depends when you ask me - on the first I saw toString() I 
wanted to confirm that it was just the path - getPath() would have been clearer 
to me and followed more of a getter / setter pattern (well getter since the 
class is immutable)  If there were additional convenience methods added, then 
it probably would make more sense.  Adding additional convenience functions if 
there are common code access patterns would be a stronger encapsulation of the 
(X)Lock concept as a object vs just a wrapper around a String.  But I think a 
lot of this is also personal preference - that's why I am trying to frame these 
questions to see if others had an opinion.




----------------------------------------------------------------
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.

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


Reply via email to