RetryParams 类
- java.
lang. Object - com.
microsoft. bot. connector. authentication. RetryParams
- com.
public class RetryParams
重试状态。
字段摘要
| 修饰符和类型 | 字段和描述 |
|---|---|
| static final int | MAX_RETRIES |
构造函数摘要
| 构造函数 | 说明 |
|---|---|
| RetryParams() |
默认重试选项。 |
| RetryParams(long withRetryAfter) |
使用指定的延迟重试 |
方法摘要
| 修饰符和类型 | 方法和描述 |
|---|---|
|
static
Retry |
defaultBackOff(int retryCount)
帮助程序使用默认退避时间创建重试 |
| long |
getRetryAfter()
重试延迟。 |
| boolean |
getShouldRetry()
指示是否应重试。 |
| void |
setRetryAfter(long withRetryAfter)
设置重试延迟。 |
| void |
setShouldRetry(boolean withShouldRetry)
设置是否应重试。 |
|
static
Retry |
stopRetrying()
帮助程序创建重试 |
方法继承自 java.lang.Object
字段详细信息
MAX_RETRIES
public static final int MAX_RETRIES
构造函数详细信息
RetryParams
public RetryParams()
默认重试选项。
RetryParams
public RetryParams(long withRetryAfter)
具有指定延迟的 RetryParams。
参数:
方法详细信息
defaultBackOff
public static RetryParams defaultBackOff(int retryCount)
帮助程序使用默认回退时间创建 RetryParams。
参数:
返回:
getRetryAfter
public long getRetryAfter()
重试延迟。
返回:
getShouldRetry
public boolean getShouldRetry()
指示是否应重试。
返回:
setRetryAfter
public void setRetryAfter(long withRetryAfter)
设置重试延迟。
参数:
setShouldRetry
public void setShouldRetry(boolean withShouldRetry)
设置是否应重试。
参数:
stopRetrying
public static RetryParams stopRetrying()
帮助程序使用 false 的 shouldRetry 创建 RetryParams。
返回: