iamaleksey commented on code in PR #22:
URL: https://github.com/apache/cassandra-accord/pull/22#discussion_r1067277839


##########
accord-core/src/main/java/accord/primitives/Timestamp.java:
##########
@@ -19,62 +19,145 @@
 package accord.primitives;
 
 import accord.local.Node.Id;
+import accord.utils.Invariants;
+
+import javax.annotation.Nonnull;
 
 public class Timestamp implements Comparable<Timestamp>
 {
+    public static Timestamp fromBits(long msb, long lsb, Id node)
+    {
+        return new Timestamp(msb, lsb, node);
+    }
+
+    public static Timestamp fromValues(long epoch, long hlc, Id node)
+    {
+        return new Timestamp(epoch, hlc, 0, node);
+    }
+
+    public static Timestamp fromValues(long epoch, long hlc, int flags, Id 
node)
+    {
+        return new Timestamp(epoch, hlc, flags, node);
+    }
+
+    public static Timestamp maxForEpoch(long epoch)
+    {
+        return new Timestamp((epoch << 16) | 0xffff, Long.MAX_VALUE, Id.MAX);

Review Comment:
   Also, `MAX_FLAGS`?



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