mcherkasov commented on a change in pull request #6490: IGNITE-7285 Add default 
query timeout
URL: https://github.com/apache/ignite/pull/6490#discussion_r337122712
 
 

 ##########
 File path: 
modules/core/src/main/java/org/apache/ignite/configuration/IgniteConfiguration.java
 ##########
 @@ -1075,6 +1083,34 @@ public IgniteConfiguration setSqlQueryHistorySize(int 
size) {
         return this;
     }
 
+    /**
+     * Defines the default query timeout.
+     *
+     * Defaults to {@link #DFLT_QRY_TIMEOUT}.
+     * {@code 0} means there is no timeout (this
+     * is a default value)
+     *
+     * @return Default query timeout.
+     */
+    public long getDefaultQueryTimeout() {
+        return dfltQryTimeout;
+    }
+
+    /**
+     * Sets timeout in milliseconds for default query timeout.
+     * {@code 0} means there is no timeout (this
+     * is a default value)
+     *
+     * @param dfltQryTimeout Timeout in milliseconds.
+     * @return {@code this} for chaining.
+     */
+    public IgniteConfiguration setDefaultQueryTimeout(long dfltQryTimeout) {
+        A.ensure(dfltQryTimeout >= 0 && dfltQryTimeout <= Integer.MAX_VALUE, 
"default query timeout value should be valid Integer.");
 
 Review comment:
   please remove dfltQryTimeout <= Integer.MAX_VALUE, it's useless check, 
because it's always "true".

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to