Questions tagged [java-failsafe]

Failsafe is a library for handling failures in Java 8+. It works by wrapping executable logic with one or more resilience policies, which can be combined and composed as needed. Project documentation http://jodah.net/failsafe/

20 questions
0
votes
0 answers

Failsafe: is it possible to execute Function with it?

I'm working with net.jodah.failsafe framework. From what I found in tutorials, Failsafe can execute Runnable and Supplier. Is there any API to execute Function? I need it because method, that I want to run with Failsafe, should both: receive…
Igor_M
  • 308
  • 2
  • 12
0
votes
0 answers

Failsafe : Execute a void method and return result based on success/failure

I am using Failsafe framework (link) to execute a method. My use case is to execute a void method x number of times and return success or failure based on the execution result. Below is how my (pseudo) code looks like: public void…
Darshan Mehta
  • 30,102
  • 11
  • 68
  • 102
0
votes
1 answer

Apache HttpClient : Retry with failsafe results in 400 (bad request)

I am using Apache HttpClient with Failsafe java library. Below is how the (pseudo) code looks like: RetryPolicy policy = new RetryPolicy<>() .handleResultIf(/* Response code is 404 */) …
Darshan Mehta
  • 30,102
  • 11
  • 68
  • 102
0
votes
1 answer

Failsafe RetryPolicy - throw exception from supplyAsync

I'm implementing a retry policy. Basically what I want to do is retry a POST request on a separate thread. I'm using Failsafe (https://failsafe.dev/async-execution/#async-integration) Here is my…
0
votes
1 answer

Failsafe - do some action when retries exceeded and try one more time

I have a use case, where I need to call UPDATE/DELETE Rest endpoint, which might return exception about entity being locked for editing. I want to wait some time for entity being unlocked, otherwise call force unlock endpoint and call one more time…
kqr
  • 406
  • 8
  • 12
1
2