* 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
|
|
@ -5,9 +5,7 @@
|
|||
package jdocs.ddata;
|
||||
|
||||
//#data-bot
|
||||
import static java.util.concurrent.TimeUnit.SECONDS;
|
||||
|
||||
import scala.concurrent.duration.Duration;
|
||||
import java.time.Duration;
|
||||
import java.util.concurrent.ThreadLocalRandom;
|
||||
|
||||
import akka.actor.AbstractActor;
|
||||
|
|
@ -37,7 +35,7 @@ public class DataBot extends AbstractActor {
|
|||
private final Cluster node = Cluster.get(getContext().getSystem());
|
||||
|
||||
private final Cancellable tickTask = getContext().getSystem().scheduler().schedule(
|
||||
Duration.create(5, SECONDS), Duration.create(5, SECONDS), getSelf(), TICK,
|
||||
Duration.ofSeconds(5), Duration.ofSeconds(5), getSelf(), TICK,
|
||||
getContext().dispatcher(), getSelf());
|
||||
|
||||
private final Key<ORSet<String>> dataKey = ORSetKey.create("key");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue