private <T> void unwrapCompletionExceptionAndThrowStoreException(Throwable throwable, Class<T> clazz,
      Function<T, StoreException> exceptionFunction) throws CompletionException {
    Exception ex = Utils.extractFutureExceptionCause(throwable);

    if (clazz.isInstance(ex)) {
      throw new CompletionException(exceptionFunction.apply((T) ex));
    }
    throw throwable instanceof CompletionException ? (CompletionException) throwable
        : new CompletionException(throwable);
  }
Update the TTL of the specified blob if needed depending on the cache state asynchronously.
@param blobId the blob to update
@return a {@link CompletableFuture} that will eventually complete successfully if the update was performed or
        will contain a {@link CloudStorageException} if an error occurred.
ambry-cloud/src/main/java/com/github/ambry/cloud/CloudBlobStore.java