belliottsmith commented on code in PR #7:
URL: https://github.com/apache/cassandra-accord/pull/7#discussion_r1013054625


##########
accord-core/src/main/java/accord/primitives/PartialDeps.java:
##########
@@ -0,0 +1,87 @@
+package accord.primitives;
+
+public class PartialDeps extends Deps
+{
+    public static final PartialDeps NONE = new PartialDeps(KeyRanges.EMPTY, 
Deps.NONE.keys, Deps.NONE.txnIds, Deps.NONE.keyToTxnId);
+
+    public static class SerializerSupport
+    {
+        private SerializerSupport() {}
+
+        public static PartialDeps create(KeyRanges covering, Keys keys, 
TxnId[] txnIds, int[] keyToTxnId)
+        {
+            return new PartialDeps(covering, keys, txnIds, keyToTxnId);
+        }
+    }
+
+    public static class OrderedBuilder extends 
AbstractOrderedBuilder<PartialDeps>
+    {
+        final KeyRanges covering;
+        public OrderedBuilder(KeyRanges covering, boolean hasOrderedTxnId)
+        {
+            super(hasOrderedTxnId);
+            this.covering = covering;
+        }
+
+        @Override
+        PartialDeps build(Keys keys, TxnId[] txnIds, int[] keysToTxnIds)
+        {
+            return new PartialDeps(covering, keys, txnIds, keysToTxnIds);
+        }
+    }
+
+    public static OrderedBuilder orderedBuilder(KeyRanges ranges, boolean 
hasOrderedTxnId)
+    {
+        return new OrderedBuilder(ranges, hasOrderedTxnId);
+    }
+
+    public final KeyRanges covering;
+
+    PartialDeps(KeyRanges covering, Keys keys, TxnId[] txnIds, int[] 
keyToTxnId)
+    {
+        super(keys, txnIds, keyToTxnId);
+        this.covering = covering;

Review Comment:
   covering is intended to serve as a minimum, not a maximum, though we could 
perhaps treat it as a precise property.



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

To unsubscribe, e-mail: [email protected]

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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to