Skip to content
This repository was archived by the owner on Sep 26, 2023. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions gax/src/main/java/com/google/api/gax/retrying/RetryAlgorithm.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@

import static com.google.common.base.Preconditions.checkNotNull;

import com.google.api.core.BetaApi;
import java.util.concurrent.CancellationException;

/**
Expand Down Expand Up @@ -114,4 +115,14 @@ public boolean shouldRetry(
&& nextAttemptSettings != null
&& timedAlgorithm.shouldRetry(nextAttemptSettings);
}

@BetaApi("Surface for inspecting the a RetryAlgorithm is not yet stable")
public ResultRetryAlgorithm<ResponseT> getResultAlgorithm() {
return resultAlgorithm;
}

@BetaApi("Surface for inspecting the a RetryAlgorithm is not yet stable")
public TimedRetryAlgorithm getTimedAlgorithm() {
return timedAlgorithm;
}
}