#2721 - Adding implicit sender to Scheduler + tests
This commit is contained in:
parent
68f72459a3
commit
978c86339f
8 changed files with 42 additions and 51 deletions
|
|
@ -79,7 +79,7 @@ public class SchedulerDocTestBase {
|
|||
//to the tickActor after 0ms repeating every 50ms
|
||||
Cancellable cancellable = system.scheduler().schedule(Duration.Zero(),
|
||||
Duration.create(50, TimeUnit.MILLISECONDS), tickActor, "Tick",
|
||||
system.dispatcher());
|
||||
system.dispatcher(), null);
|
||||
|
||||
//This cancels further Ticks to be sent
|
||||
cancellable.cancel();
|
||||
|
|
|
|||
|
|
@ -148,7 +148,7 @@ public class FaultHandlingDocSample {
|
|||
progressListener = getSender();
|
||||
getContext().system().scheduler().schedule(
|
||||
Duration.Zero(), Duration.create(1, "second"), getSelf(), Do,
|
||||
getContext().dispatcher()
|
||||
getContext().dispatcher(), null
|
||||
);
|
||||
} else if (msg.equals(Do)) {
|
||||
counterService.tell(new Increment(1), getSelf());
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ public class SchedulerPatternTest {
|
|||
private final Cancellable tick = getContext().system().scheduler().schedule(
|
||||
Duration.create(500, TimeUnit.MILLISECONDS),
|
||||
Duration.create(1000, TimeUnit.MILLISECONDS),
|
||||
getSelf(), "tick", getContext().dispatcher());
|
||||
getSelf(), "tick", getContext().dispatcher(), null);
|
||||
//#schedule-constructor
|
||||
// this variable and constructor is declared here to not show up in the docs
|
||||
final ActorRef target;
|
||||
|
|
|
|||
|
|
@ -198,7 +198,7 @@ public class ZeromqDocTestBase {
|
|||
public void preStart() {
|
||||
getContext().system().scheduler()
|
||||
.schedule(Duration.create(1, "second"), Duration.create(1, "second"),
|
||||
getSelf(), TICK, getContext().dispatcher());
|
||||
getSelf(), TICK, getContext().dispatcher(), null);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue