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

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.

主站蜘蛛池模板: 洛川县| 大田县| 土默特左旗| 密山市| 淮安市| 晋城| 晋州市| 正定县| 邻水| 牡丹江市| 温宿县| 双峰县| 巴林左旗| 佛冈县| 闻喜县| 德昌县| 黎城县| 周宁县| 梁河县| 宁都县| 南郑县| 和田市| 满洲里市| 高邮市| 蕲春县| 志丹县| 青阳县| 福贡县| 徐闻县| 凌云县| 保山市| 镇康县| 尼木县| 沙坪坝区| 仪陇县| 图木舒克市| 行唐县| 紫阳县| 盐边县| 大余县| 西宁市|