@Test public void testRefresh() throws Exception { new JavaTestKit(system) { { final Props props = LobbyBalancerActor.props(configuration, 0, 5); final ActorRef subject = system.actorOf(props); final RequestInformation req = RequestInformation.INSTANCE; watch(subject); subject.tell(Refresh.INSTANCE, getRef()); expectNoMsg(duration("1 second")); } }; }
private void refresh() { instances.forEach((instance, info) -> instance.tell(RequestInformation.INSTANCE, self())); }
LobbyBalancerActor extends AbstractActor { private void refresh() { instances.forEach((instance, info) -> instance.tell(RequestInformation.INSTANCE, self())); } }
LobbyBalancerActor extends AbstractActor { private void refresh() { instances.forEach((instance, info) -> instance.tell(RequestInformation.INSTANCE, self())); } private  LobbyBalancerActor(LobbyConfiguration configuration, int min, int max); }
LobbyBalancerActor extends AbstractActor { private void refresh() { instances.forEach((instance, info) -> instance.tell(RequestInformation.INSTANCE, self())); } private  LobbyBalancerActor(LobbyConfiguration configuration, int min, int max); @Override void preStart(); @Override PartialFunction<Object, BoxedUnit> receive(); static Props props(LobbyConfiguration configuration, int min, int max); static Props props(LobbyConfiguration configuration); }
LobbyBalancerActor extends AbstractActor { private void refresh() { instances.forEach((instance, info) -> instance.tell(RequestInformation.INSTANCE, self())); } private  LobbyBalancerActor(LobbyConfiguration configuration, int min, int max); @Override void preStart(); @Override PartialFunction<Object, BoxedUnit> receive(); static Props props(LobbyConfiguration configuration, int min, int max); static Props props(LobbyConfiguration configuration);  }