You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@helix.apache.org by zh...@apache.org on 2022/03/09 17:29:43 UTC
[helix] branch master updated: Add 3 Zookeeper CreateMode types to AccessOption (#1975)
This is an automated email from the ASF dual-hosted git repository.
zhangmeng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/helix.git
The following commit(s) were added to refs/heads/master by this push:
new 8294c95 Add 3 Zookeeper CreateMode types to AccessOption (#1975)
8294c95 is described below
commit 8294c959d368fb6ec48c408a43a7cabdaae9f834
Author: Ramin Bashizade <ra...@linkedin.com>
AuthorDate: Wed Mar 9 09:29:31 2022 -0800
Add 3 Zookeeper CreateMode types to AccessOption (#1975)
This commit adds the 3 missing CreateMode types to AccessOption
class in helix-core: CONTAINER, PERSISTENT_WITH_TTL, and
PERSISTENT_SEQUENTIAL_WITH_TTL.
---
helix-core/src/main/java/org/apache/helix/AccessOption.java | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/helix-core/src/main/java/org/apache/helix/AccessOption.java b/helix-core/src/main/java/org/apache/helix/AccessOption.java
index 11ea95d..64682a5 100644
--- a/helix-core/src/main/java/org/apache/helix/AccessOption.java
+++ b/helix-core/src/main/java/org/apache/helix/AccessOption.java
@@ -27,6 +27,9 @@ public class AccessOption {
public static int PERSISTENT_SEQUENTIAL = 0x4;
public static int EPHEMERAL_SEQUENTIAL = 0x8;
public static int THROW_EXCEPTION_IFNOTEXIST = 0x10;
+ public static int CONTAINER = 0x20;
+ public static int PERSISTENT_WITH_TTL = 0x40;
+ public static int PERSISTENT_SEQUENTIAL_WITH_TTL = 0x80;
/**
* Helper method to get zookeeper create mode from options
@@ -42,6 +45,12 @@ public class AccessOption {
return CreateMode.PERSISTENT_SEQUENTIAL;
} else if ((options & EPHEMERAL_SEQUENTIAL) > 0) {
return CreateMode.EPHEMERAL_SEQUENTIAL;
+ } else if ((options & CONTAINER) > 0) {
+ return CreateMode.CONTAINER;
+ } else if ((options & PERSISTENT_WITH_TTL) > 0) {
+ return CreateMode.PERSISTENT_WITH_TTL;
+ } else if ((options & PERSISTENT_SEQUENTIAL_WITH_TTL) > 0) {
+ return CreateMode.PERSISTENT_SEQUENTIAL_WITH_TTL;
}
return null;