This commit is contained in:
parent
acb71ac4e5
commit
e0c64f59d8
4 changed files with 16 additions and 2 deletions
|
|
@ -803,7 +803,7 @@ final class Flow[-In, +Out, +Mat](delegate: scaladsl.Flow[In, Out, Mat]) extends
|
|||
* RecoverWithRetries allows to switch to alternative Source on flow failure. It will stay in effect after
|
||||
* a failure has been recovered up to `attempts` number of times so that each time there is a failure
|
||||
* it is fed into the `pf` and a new Source may be materialized. Note that if you pass in 0, this won't
|
||||
* attempt to recover at all. Passing in a negative number will behave exactly the same as `recoverWith`.
|
||||
* attempt to recover at all. Passing in -1 will behave exactly the same as `recoverWith`.
|
||||
*
|
||||
* Since the underlying failure signal onError arrives out-of-band, it might jump over existing elements.
|
||||
* This stage can recover the failure signal, but not the skipped elements, which will be dropped.
|
||||
|
|
@ -817,6 +817,9 @@ final class Flow[-In, +Out, +Mat](delegate: scaladsl.Flow[In, Out, Mat]) extends
|
|||
*
|
||||
* '''Cancels when''' downstream cancels
|
||||
*
|
||||
* @param attempts Maximum number of retries or -1 to retry indefinitely
|
||||
* @param pf Receives the failure cause and returns the new Source to be materialized if any
|
||||
* @throws IllegalArgumentException if `attempts` is a negative number other than -1
|
||||
*/
|
||||
def recoverWithRetries[T >: Out](attempts: Int, pf: PartialFunction[Throwable, _ <: Graph[SourceShape[T], NotUsed]]): javadsl.Flow[In, T, Mat @uncheckedVariance] =
|
||||
new Flow(delegate.recoverWithRetries(attempts, pf))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue