docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class ExponentialBackOffRetryPolicy

    Implements an exponential back-off retry policy for handling transient errors.

    Inheritance
    object
    ExponentialBackOffRetryPolicy
    Implements
    IRetryPolicy
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEngine.Purchasing
    Assembly: Unity.Purchasing.dll
    Syntax
    public class ExponentialBackOffRetryPolicy : IRetryPolicy

    Constructors

    ExponentialBackOffRetryPolicy(int, int, float)

    Initializes a new instance of ExponentialBackOffRetryPolicy.

    Declaration
    public ExponentialBackOffRetryPolicy(int baseRetryDelay = 1000, int maxRetryDelay = 30000, float exponentialFactor = 2)
    Parameters
    Type Name Description
    int baseRetryDelay

    The base delay in milliseconds before the first retry.

    int maxRetryDelay

    The maximum delay in milliseconds before retrying.

    float exponentialFactor

    The exponential factor by which the retry delay increases after each attempt.

    Methods

    ShouldRetry(IRetryPolicyInformation)

    Determines whether the policy should retry the operation based on the provided information.

    Declaration
    public virtual Task<bool> ShouldRetry(IRetryPolicyInformation info)
    Parameters
    Type Name Description
    IRetryPolicyInformation info

    The information about the retry attempt, including the number of attempts made.

    Returns
    Type Description
    Task<bool>

    True if the operation should be retried; otherwise, false.

    Implements

    IRetryPolicy
    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)