- Hands-On Enterprise Java Microservices with Eclipse MicroProfile
- Cesar Saavedra Heiko W. Rupp Jeff Mesnil Pavol Loffay Antoine Sabot Durand Scott Stark
- 81字
- 2021-06-24 12:56:23
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.
推薦閱讀
- RCNP實驗指南:構建高級的路由互聯(lián)網(wǎng)絡(BARI)
- 自動駕駛網(wǎng)絡:自智時代的網(wǎng)絡架構
- 數(shù)據(jù)通信網(wǎng)絡實踐:基礎知識與交換機技術
- C++黑客編程揭秘與防范
- Mastering Machine Learning for Penetration Testing
- 物聯(lián)網(wǎng)安全:理論、實踐與創(chuàng)新
- 網(wǎng)絡故障現(xiàn)場處理實踐(第4版)
- Hands-On Chatbot Development with Alexa Skills and Amazon Lex
- 局域網(wǎng)組建、管理與維護項目教程(Windows Server 2003)
- HTML5 Game development with ImpactJS
- Building RESTful Web Services with Spring 5(Second Edition)
- NB-IoT物聯(lián)網(wǎng)技術解析與案例詳解
- 中國互聯(lián)網(wǎng)發(fā)展報告2018
- Working with Legacy Systems
- TD-LTE無線網(wǎng)絡規(guī)劃與設計