@Test public void disposeAllScheduledDisposablesAfterSendingMessageToRegisteredActor() throws Exception { final ActorSystemInstance actorSystem = ActorSystemInstance .getInstance("disposeAllScheduledDisposablesAfterSendingMessageToRegisteredActor"); new TestAsync<Void>().apply(new Function<CountDownLatch, Void>() { @Override public Void apply(@NonNull CountDownLatch countDownLatch) { MockActorTwo actor = new MockActorTwo(countDownLatch); actorSystem.register(actor); ActorScheduler.after(10, actorSystem).send(message, MockActorTwo.class); return null; } }); actorSystem.unregister(MockActorTwo.class); assertTrue(ActorScheduler.schedules.get(MockActorTwo.class) == null); }
@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);  }