官术网_书友最值得收藏!

The @Retry policy

Should the operation fail, you can apply the retry policy to have the operation invoked again. The @Retry annotation can be used on a class or method level like this:

@Retry(maxRetries = 5, maxDuration= 1000, retryOn = {IOException.class})
public void operationToRetry() {
...
}

In the previous example, the operation should be retried a maximum of five times only on IOException. If the total duration of all retries lasts more than 1,000 ms, the operation will be aborted.

主站蜘蛛池模板: 遵义县| 宝丰县| 昂仁县| 江源县| 焉耆| 苍山县| 滁州市| 娄底市| 涪陵区| 安顺市| 青神县| 自治县| 崇仁县| 方正县| 大同县| 固原市| 钦州市| 锡林郭勒盟| 惠水县| 密山市| 吉隆县| 蒙城县| 会泽县| 彭山县| 深泽县| 元朗区| 法库县| 邹城市| 阳春市| 梓潼县| 时尚| 山丹县| 皮山县| 正安县| 仪陇县| 长沙县| 同江市| 札达县| 台山市| 驻马店市| 斗六市|