* Add java.time.Duration support in the JavaDSL in akka-actor module #24646 * add deprecation and change retry
This commit is contained in:
parent
e18382bb0f
commit
6a9fa1946d
35 changed files with 419 additions and 80 deletions
|
|
@ -552,7 +552,7 @@ public class FutureDocTest extends AbstractJavaTest {
|
|||
//#retry
|
||||
final ExecutionContext ec = system.dispatcher();
|
||||
Callable<CompletionStage<String>> attempt = () -> CompletableFuture.completedFuture("test");
|
||||
CompletionStage<String> retriedFuture = retry(attempt, 3, Duration.create(200, "millis"), system.scheduler(), ec);
|
||||
CompletionStage<String> retriedFuture = retry(attempt, 3, java.time.Duration.ofMillis(200), system.scheduler(), ec);
|
||||
//#retry
|
||||
|
||||
retriedFuture.toCompletableFuture().get(2, SECONDS);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue