@@ -64,6 +64,12 @@ void TBackoffStrategy::ApplyJitter()
BackoffWithJitter_ = isNegative ? Backoff_ - jitter : Backoff_ + jitter;
}
+
+void TBackoffStrategy::UpdateOptions(const TExponentialBackoffOptions& newOptions)
+{
+ Options_ = newOptions;
+}
////////////////////////////////////////////////////////////////////////////////
} // namespace NYT
@@ -52,8 +52,10 @@ public:
TDuration GetBackoff() const;
+ void UpdateOptions(const TExponentialBackoffOptions& newOptions);
private:
- const TExponentialBackoffOptions Options_;
+ TExponentialBackoffOptions Options_;
int RetryIndex_;
TDuration Backoff_;