@Test public void sendTheSameMessageTwiceAfterTheFirstOneReceivedAndAcceptBoth() throws Exception { final ActorSystemInstance actorSystem = ActorSystemInstance .getInstance("sendTheSameMessageTwiceAfterTheFirstOneReceivedAndAcceptBoth"); final MockActorTen actor = new MockActorTen(); new TestAsync<Void>().apply(new Function<CountDownLatch, Void>() { @Override public Void apply(@NonNull CountDownLatch countDownLatch) throws Exception { actor.setCountDownLatch(countDownLatch); actorSystem.register(actor); ActorScheduler.after(10, actorSystem).send(new Message(1, 1), MockActorTen.class); return null; } }); new TestAsync<Void>().apply(new Function<CountDownLatch, Void>() { @Override public Void apply(@NonNull CountDownLatch countDownLatch) throws Exception { actor.setCountDownLatch(countDownLatch); ActorScheduler.after(10, actorSystem).send(new Message(1, 2), MockActorTen.class); return null; } }); actorSystem.unregister(MockActorTen.class); assertTrue(actor.message.getContent().equals(2)); }
@NonNull public static ScheduledMessageSender after(@IntRange(from = 0) long millis) { return after(millis, ActorSystemInstance.getInstance(null)); }
ActorScheduler { @NonNull public static ScheduledMessageSender after(@IntRange(from = 0) long millis) { return after(millis, ActorSystemInstance.getInstance(null)); } }
ActorScheduler { @NonNull public static ScheduledMessageSender after(@IntRange(from = 0) long millis) { return after(millis, ActorSystemInstance.getInstance(null)); } ActorScheduler(); }
ActorScheduler { @NonNull public static ScheduledMessageSender after(@IntRange(from = 0) long millis) { return after(millis, ActorSystemInstance.getInstance(null)); } ActorScheduler(); @NonNull static ScheduledMessageSender after(@IntRange(from = 0) long millis); static void cancel(@NonNull Class<?> actorAddress); }
ActorScheduler { @NonNull public static ScheduledMessageSender after(@IntRange(from = 0) long millis) { return after(millis, ActorSystemInstance.getInstance(null)); } ActorScheduler(); @NonNull static ScheduledMessageSender after(@IntRange(from = 0) long millis); static void cancel(@NonNull Class<?> actorAddress);  }