Still the newbie in Scala and I\'m now looking for a way to implement the following code on it:
@Override
public void store(InputStream source, String destin
There is an existing library that can help with that, called retry, and there is a Java library too, called guava-retrying.
Here are some examples of using retry:
// retry 4 times
val future = retry.Directly(4) { () => doSomething }
// retry 3 times pausing 30 seconds in between attempts
val future = retry.Pause(3, 30.seconds) { () => doSomething }
// retry 4 times with a delay of 1 second which will be multipled
// by 2 on every attempt
val future = retry.Backoff(4, 1.second) { () => doSomething }