squbs
squbs copied to clipboard
Retry stage needs more flexible signatures
Currently, the Retry stage takes (T, C) in and (Try[U], C) out. In some cases, the input is already derived from the context C and the output is attached to the context C. So we end up with concrete input types like (NotUsed, C) in and (Try[Done], C) output. In Scala this is not such a big deal. In Java it makes the signature very long.
If there is a decider, it can also decide based on attributes of C whether it should be retried or not. That makes the Retry use just the type signature [C, C, C, C, NotUsed].