add java.time.Duration support for javadsl #24646
* add java.time.Duration support for askWithReplyto methods and add deprecated to method with akka Timeout as parameter type
This commit is contained in:
parent
b9aecb7f5a
commit
eb5885e94e
5 changed files with 95 additions and 9 deletions
|
|
@ -149,9 +149,8 @@ public class RecipeGlobalRateLimit extends RecipeTest {
|
|||
final Flow<T, T, NotUsed> f = Flow.create();
|
||||
|
||||
return f.mapAsync(parallelism, element -> {
|
||||
final Timeout triggerTimeout = Timeout.create(maxAllowedWait);
|
||||
final CompletionStage<Object> limiterTriggerFuture =
|
||||
PatternsCS.ask(limiter, Limiter.WANT_TO_PASS, triggerTimeout);
|
||||
PatternsCS.ask(limiter, Limiter.WANT_TO_PASS, maxAllowedWait);
|
||||
return limiterTriggerFuture.thenApplyAsync(response -> element, system.dispatcher());
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue