private void CreateChildUserIfNotExist(int userId) { if (!_users.ContainsKey(userId)) { var childActor = Context.ActorOf(Props.Create(() => new UserActor(userId)), "User" + userId); _users.Add(userId, childActor); ColorConsole.WriteCyan("UserCooridnator actor created new child UserActor for {0}, Total: {1}", userId, _users.Count); } }
protected override void PostRestart(Exception reason) { ColorConsole.WriteCyan("UserCoordinatorActor PostRestart because: {0}", reason); base.PostRestart(reason); }
protected override void PreRestart(Exception reason, object message) { ColorConsole.WriteCyan("UserCoordinatorActor PreRestart because: {0}", reason); base.PreRestart(reason, message); }
protected override void PostStop() { ColorConsole.WriteCyan("UserCoordinatorActor PostStop"); }
protected override void PreStart() { ColorConsole.WriteCyan("UserCoordinatorActor PreStart"); }