foldright / cffu

🦝 Java CompletableFuture-Fu(CF-Fu, pronounced "Shifu"), a tiny sidekick library to make CompletableFuture usage more convenient, more efficient and safer in your application. 😋🚀🦺
https://github.com/foldright/cffu
Apache License 2.0
174 stars 23 forks source link

add retry support #201

Closed linzee1 closed 3 months ago

linzee1 commented 3 months ago

PR of issue

codecov[bot] commented 3 months ago

Codecov Report

Attention: Patch coverage is 33.53659% with 218 lines in your changes missing coverage. Please review.

Project coverage is 83.60%. Comparing base (6e1a6cb) to head (b106230). Report is 16 commits behind head on main.

Files Patch % Lines
...foldright/cffu/retry/ImmutableTriggerStrategy.java 0.00% 96 Missing :warning:
...o/foldright/cffu/retry/ImmutableRetryStrategy.java 33.08% 89 Missing and 2 partials :warning:
...foldright/cffu/retry/CompositeTriggerStrategy.java 0.00% 17 Missing :warning:
...a/io/foldright/cffu/RetryingCompletableFuture.java 80.00% 6 Missing and 6 partials :warning:
...in/java/io/foldright/cffu/retry/DelayStrategy.java 50.00% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #201 +/- ## ============================================= - Coverage 95.45% 83.60% -11.85% - Complexity 692 731 +39 ============================================= Files 16 23 +7 Lines 1386 1714 +328 Branches 120 171 +51 ============================================= + Hits 1323 1433 +110 - Misses 36 246 +210 - Partials 27 35 +8 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

oldratlee commented 3 months ago

Mature resilience4j fault tolerance library provides retry with first-class support of CompletionStage/CompletableFuture.

It's recommended to use resilience4j retry rather than re-implementing in cffu. @linzee1