This is an automated email from the ASF dual-hosted git repository. mhubail pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/asterixdb.git
commit 23677ff996a6c8413b8a7889771241e065c1218f Author: Michael Blow <[email protected]> AuthorDate: Sun Mar 30 21:30:34 2025 -0400 [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 <[email protected]> Reviewed-by: Hussain Towaileb <[email protected]> --- .../asterix/cloud/clients/ICloudGuardian.java | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) 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 2125cdd9c3..ba0f1e7a94 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 @@ public interface ICloudGuardian { */ 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 @@ public interface ICloudGuardian { @Override public void setCloudClient(ICloudClient cloudClient) { } + + @Override + public long getCloudAccessTtl(TimeUnit timeUnit) { + return 0L; + } } }
