jiajunwang commented on a change in pull request #718: Implement Helix 
nonblocking lock
URL: https://github.com/apache/helix/pull/718#discussion_r379656665

 File path: helix-lock/src/main/java/org/apache/helix/lock/LockInfo.java
 @@ -19,28 +19,162 @@
 package org.apache.helix.lock;
-import java.util.Map;
+import org.apache.helix.HelixProperty;
+import org.apache.helix.ZNRecord;
- * Generic interface for a map contains the Helix lock information
- * @param <T> The type of the LockInfo value
+ * Structure represents a lock node information, implemented using ZNRecord
-public interface LockInfo<T> {
+public class LockInfo extends HelixProperty {
-  //TODO: add specific setter and getter for any field that is determined to 
be universal for all implementations of HelixLock
+  // Default values for each attribute if there are no current values set by 
+  public static final String DEFAULT_OWNER_TEXT = "";
+  public static final String DEFAULT_MESSAGE_TEXT = "";
+  public static final long DEFAULT_TIMEOUT_LONG = -1L;
+  // default lock info represents the status of a unlocked lock
+  public static final LockInfo defaultLockInfo = new LockInfo("");
+  /**
+   * The keys to lock information
+   */
+  public enum LockInfoAttribute {
+  }
+  /**
+   * Initialize a LockInfo with a ZNRecord id, set all info fields to default 
+   */
+  public LockInfo(String id) {
+    super(id);
 Review comment:
   Should this one be the ownerId? Or what is the use case of this default 

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:

With regards,
Apache Git Services

To unsubscribe, e-mail: reviews-unsubscr...@helix.apache.org
For additional commands, e-mail: reviews-h...@helix.apache.org

Reply via email to