curator-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From randg...@apache.org
Subject [02/16] curator git commit: forgot sequential
Date Tue, 03 May 2016 15:20:54 GMT
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-322
Commit: da760f96cc5e553e7475505f282bce60a5da3056
Parents: ef1658c
Author: randgalt <randgalt@apache.org>
Authored: Mon May 2 14:16:48 2016 -0500
Committer: randgalt <randgalt@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);
     }
 


Mime
View raw message