You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@curator.apache.org by ra...@apache.org on 2016/05/19 19:02:17 UTC

[02/35] curator git commit: forgot sequential

forgot sequential


Project: http://git-wip-us.apache.org/repos/asf/curator/repo
Commit: http://git-wip-us.apache.org/repos/asf/curator/commit/da760f96
Tree: http://git-wip-us.apache.org/repos/asf/curator/tree/da760f96
Diff: http://git-wip-us.apache.org/repos/asf/curator/diff/da760f96

Branch: refs/heads/CURATOR-3.0
Commit: da760f96cc5e553e7475505f282bce60a5da3056
Parents: ef1658c
Author: randgalt <ra...@apache.org>
Authored: Mon May 2 14:16:48 2016 -0500
Committer: randgalt <ra...@apache.org>
Committed: Mon May 2 14:16:48 2016 -0500

----------------------------------------------------------------------
 .../java/org/apache/curator/framework/schema/Schema.java  | 10 ++++++++++
 1 file changed, 10 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/curator/blob/da760f96/curator-framework/src/main/java/org/apache/curator/framework/schema/Schema.java
----------------------------------------------------------------------
diff --git a/curator-framework/src/main/java/org/apache/curator/framework/schema/Schema.java b/curator-framework/src/main/java/org/apache/curator/framework/schema/Schema.java
index f10542d..7b8f1d5 100644
--- a/curator-framework/src/main/java/org/apache/curator/framework/schema/Schema.java
+++ b/curator-framework/src/main/java/org/apache/curator/framework/schema/Schema.java
@@ -49,6 +49,16 @@ public class Schema
             throw new SchemaViolation(this, "Must be ephemeral");
         }
 
+        if ( mode.isSequential() && (sequential == Allowance.CANNOT) )
+        {
+            throw new SchemaViolation(this, "Cannot be sequential");
+        }
+
+        if ( !mode.isSequential() && (sequential == Allowance.MUST) )
+        {
+            throw new SchemaViolation(this, "Must be sequential");
+        }
+
         validateData(data);
     }