vldpyatkov commented on code in PR #2325:
URL: https://github.com/apache/ignite-3/pull/2325#discussion_r1267743996


##########
modules/api/src/main/java/org/apache/ignite/tx/TransactionOptions.java:
##########
@@ -75,4 +80,28 @@ public TransactionOptions readOnly(boolean readOnly) {
 
         return this;
     }
+
+    /**
+     * Observable timestamp for read-only transactions only.
+     *
+     * @return Observable timestamp.
+     */
+    public HybridTimestamp observableTimestamp() {
+        return observableTimestamp;
+    }
+
+    /**
+     * Set observable timestamp for read-only transactions only.
+     *
+     * @param observableTimestamp Observable timestamp.
+     *
+     * @return {@code this} for chaining.
+     */
+    public TransactionOptions setObservableTimestamp(HybridTimestamp 
observableTimestamp) {
+        assert this.readOnly : "Observable timestamp is applicable only for 
read-only transactions.";

Review Comment:
   Assertion exception may be throw in public API.



##########
modules/api/src/main/java/org/apache/ignite/tx/TransactionOptions.java:
##########
@@ -75,4 +80,28 @@ public TransactionOptions readOnly(boolean readOnly) {
 
         return this;

Review Comment:
   Here need check that the readOnly is false only when observableTimestamp is 
null.



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

Reply via email to