feat: deprecate RetrySettings.isJittered [gax-java] #1308
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,6 +30,7 @@ | |
package com.google.api.gax.retrying; | ||
|
||
import com.google.auto.value.AutoValue; | ||
import com.google.common.annotations.VisibleForTesting; | ||
import java.io.Serializable; | ||
import org.threeten.bp.Duration; | ||
|
||
|
@@ -112,7 +113,11 @@ public abstract class RetrySettings implements Serializable { | |
* <pre>{@code actualDelay = rand_between(0, min(maxRetryDelay, delay))}</pre> | ||
* | ||
* The default value is {@code true}. | ||
* | ||
* @deprecated Retries will always jitter. | ||
*/ | ||
@Deprecated | ||
@VisibleForTesting | ||
public abstract boolean isJittered(); | ||
|
||
/** | ||
|
@@ -200,7 +205,11 @@ public abstract static class Builder { | |
* <pre>{@code actualDelay = rand_between(0, min(maxRetryDelay, exponentialDelay))}</pre> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. comment should be updated to specify it's a no-op There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. |
||
* | ||
* The default value is {@code true}. | ||
* | ||
* @deprecated Retries will always jitter. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this true already? I would have expected some updates to concrete methods are also necessary. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If we eventually remove the public scoping, then yes. Only ExponentialRetryAlgorithm does anything with this at the moment, but that cannot be changed without removing the test cases mentioned in the PR description. |
||
*/ | ||
@Deprecated | ||
@VisibleForTesting | ||
public abstract Builder setJittered(boolean jittered); | ||
|
||
/** | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will always --> always
per Google tech writing guidelines
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.