Skip to content

Commit

Permalink
UPDATE README
Browse files Browse the repository at this point in the history
  • Loading branch information
YukiMatsumura committed Mar 8, 2018
1 parent 16fb36f commit 021ed73
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ The following code delays the retry process with the Binary Exponential Backoff
retrofit.webapi()
.retryWhen(RxBackoff.exponential(2.0 /* Multiplier */ , 5 /* maxRetryCount */))
.subscribe(...)


// retry -> (wait 1~5000ms) -> retry -> (wait 1~5000ms) -> retry ...
retrofit.webapi()
.retryWhen(RxBackoff.random(1 /* low */, 5000 /* high */, 5 /* maxRetryCount */))
.subscribe(...)
```

The backoff algorithm allows you to choose the built-in one or choose your own one.
Expand Down

0 comments on commit 021ed73

Please sign in to comment.