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

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.

主站蜘蛛池模板: 兰州市| 永年县| 萍乡市| 巫山县| 得荣县| 乃东县| 晴隆县| 白玉县| 淅川县| 上犹县| 徐汇区| 闻喜县| 合阳县| 陆良县| 江津市| 舒城县| 河间市| 黎平县| 明溪县| 马龙县| 绥宁县| 沙湾县| 文登市| 京山县| 河西区| 克山县| 余庆县| 扎鲁特旗| 贺州市| 海淀区| 盘山县| 广饶县| 饶平县| 城固县| 体育| 霍林郭勒市| 沙雅县| 桦南县| 墨竹工卡县| 沭阳县| 远安县|