[NO ISSUE][*DB][STO] += getCloudAccessTtl to ICloudGuardian

Ext-ref: MB-65876
Change-Id: I129bd867fc6fe162bbad80efd5b888e547f5d8b5
Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/19603
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Hussain Towaileb <hussainht@gmail.com>
diff --git a/asterixdb/asterix-cloud/src/main/java/org/apache/asterix/cloud/clients/ICloudGuardian.java b/asterixdb/asterix-cloud/src/main/java/org/apache/asterix/cloud/clients/ICloudGuardian.java
index 2125cdd..ba0f1e7 100644
--- a/asterixdb/asterix-cloud/src/main/java/org/apache/asterix/cloud/clients/ICloudGuardian.java
+++ b/asterixdb/asterix-cloud/src/main/java/org/apache/asterix/cloud/clients/ICloudGuardian.java
@@ -18,6 +18,8 @@
  */
 package org.apache.asterix.cloud.clients;
 
+import java.util.concurrent.TimeUnit;
+
 /**
  * Interface containing methods to perform IO operation on the Cloud Storage
  */
@@ -41,8 +43,22 @@
      */
     void checkReadAccess(String bucket, String path);
 
+    /**
+     * Set the cloud client to be used for cloud operations.
+     *
+     * @param cloudClient the cloud client
+     */
     void setCloudClient(ICloudClient cloudClient);
 
+    /**
+     * Get the time-to-live (TTL) the guardian can assume we retain cloud access after a
+     * successful check before needing to refreshing the authorization.
+     *
+     * @param timeUnit the time unit for the TTL
+     * @return the TTL for cloud access
+     */
+    long getCloudAccessTtl(TimeUnit timeUnit);
+
     class NoOpCloudGuardian implements ICloudGuardian {
 
         public static final NoOpCloudGuardian INSTANCE = new NoOpCloudGuardian();
@@ -68,5 +84,10 @@
         @Override
         public void setCloudClient(ICloudClient cloudClient) {
         }
+
+        @Override
+        public long getCloudAccessTtl(TimeUnit timeUnit) {
+            return 0L;
+        }
     }
 }