ExponentialBackoffRetryStrategy Classe
- java.
lang. Object - com.
microsoft. bot. restclient. retry. RetryStrategy - com.
microsoft. bot. restclient. retry. ExponentialBackoffRetryStrategy
- com.
- com.
public final class ExponentialBackoffRetryStrategy
extends RetryStrategy
Uma estratégia de repetição com parâmetros de retirada para calcular o atraso exponencial entre repetições.
Resumo do campo
| Modificador e tipo | Campo e descrição |
|---|---|
| static final int |
DEFAULT_CLIENT_BACKOFF
Representa a quantidade padrão de tempo usada ao calcular um delta aleatório no atraso exponencial entre novas tentativas. |
| static final int |
DEFAULT_MAX_BACKOFF
Representa o tempo máximo padrão usado ao calcular o atraso exponencial entre novas tentativas. |
| static final int |
DEFAULT_MIN_BACKOFF
Representa a quantidade mínima padrão de tempo usada ao calcular o atraso exponencial entre novas tentativas. |
Resumo do Construtor
| Construtor | Description |
|---|---|
| ExponentialBackoffRetryStrategy() |
Inicializa uma nova instância da classe ExponentialBackoffRetryStrategy. |
| ExponentialBackoffRetryStrategy(int retryCount, int minBackoff, int maxBackoff, int deltaBackoff) |
Inicializa uma nova instância da classe ExponentialBackoffRetryStrategy. |
| ExponentialBackoffRetryStrategy(String name, int retryCount, int minBackoff, int maxBackoff, int deltaBackoff, boolean firstFastRetry) |
Inicializa uma nova instância da classe ExponentialBackoffRetryStrategy. |
Resumo do método
| Modificador e tipo | Método e descrição |
|---|---|
| boolean |
shouldRetry(int retryCount, Response response)
Retorna se uma solicitação deve ser repetida com base na contagem de repetições, na resposta atual e na estratégia atual. |
Métodos herdados de RetryStrategy
Métodos herdados de java.lang.Object
Detalhes do campo
DEFAULT_CLIENT_BACKOFF
public static final int DEFAULT_CLIENT_BACKOFF
Representa a quantidade padrão de tempo usada ao calcular um delta aleatório no atraso exponencial entre novas tentativas.
DEFAULT_MAX_BACKOFF
public static final int DEFAULT_MAX_BACKOFF
Representa o tempo máximo padrão usado ao calcular o atraso exponencial entre novas tentativas.
DEFAULT_MIN_BACKOFF
public static final int DEFAULT_MIN_BACKOFF
Representa a quantidade mínima padrão de tempo usada ao calcular o atraso exponencial entre novas tentativas.
Detalhes do construtor
ExponentialBackoffRetryStrategy
public ExponentialBackoffRetryStrategy()
Inicializa uma nova instância da classe ExponentialBackoffRetryStrategy.
ExponentialBackoffRetryStrategy
public ExponentialBackoffRetryStrategy(int retryCount, int minBackoff, int maxBackoff, int deltaBackoff)
Inicializa uma nova instância da classe ExponentialBackoffRetryStrategy.
Parâmetros:
ExponentialBackoffRetryStrategy
public ExponentialBackoffRetryStrategy(String name, int retryCount, int minBackoff, int maxBackoff, int deltaBackoff, boolean firstFastRetry)
Inicializa uma nova instância da classe ExponentialBackoffRetryStrategy.
Parâmetros:
Detalhes do método
shouldRetry
public boolean shouldRetry(int retryCount, Response response)
Retorna se uma solicitação deve ser repetida com base na contagem de repetições, na resposta atual e na estratégia atual.
Substituições:
ExponentialBackoffRetryStrategy.shouldRetry(int retryCount, Response response)Parâmetros:
Retornos: