Start() 공개 메소드

public Start ( ) : void
리턴 void
예제 #1
0
        private LocalActorRef CreateUserGuardian(LocalActorRef rootGuardian, string name)   //Corresponds to Akka's: override lazy val guardian: LocalActorRef
        {
            var cell = rootGuardian.Cell;

            cell.ReserveChild(name);
            // make user provided guardians not run on internal dispatcher
            MessageDispatcher dispatcher;

            if (_system.GuardianProps.IsEmpty)
            {
                dispatcher = InternalDispatcher;
            }
            else
            {
                var props        = _system.GuardianProps.Value;
                var dispatcherId =
                    props.Deploy.Dispatcher == Deploy.DispatcherSameAsParent
                        ? Dispatchers.DefaultDispatcherId
                        : props.Dispatcher;
                dispatcher = _system.Dispatchers.Lookup(dispatcherId);
            }

            var userGuardian = new LocalActorRef(
                _system,
                _system.GuardianProps.GetOrElse(Props.Create <GuardianActor>(UserGuardianSupervisorStrategy)),
                dispatcher,
                _defaultMailbox,
                rootGuardian,
                RootPath / name);

            cell.InitChild(userGuardian);
            userGuardian.Start();
            return(userGuardian);
        }
예제 #2
0
        private LocalActorRef CreateSystemGuardian(LocalActorRef rootGuardian, string name, LocalActorRef userGuardian)     //Corresponds to Akka's: override lazy val guardian: systemGuardian
        {
            var cell = rootGuardian.Cell;

            cell.ReserveChild(name);
            var props = Props.Create(() => new SystemGuardianActor(userGuardian), _systemGuardianStrategy);

            var systemGuardian = new LocalActorRef(_system, props, InternalDispatcher, _defaultMailbox, rootGuardian, RootPath / name);

            cell.InitChild(systemGuardian);
            systemGuardian.Start();
            return(systemGuardian);
        }
예제 #3
0
        private LocalActorRef CreateUserGuardian(LocalActorRef rootGuardian, string name)   //Corresponds to Akka's: override lazy val guardian: LocalActorRef
        {
            var cell = rootGuardian.Cell;

            cell.ReserveChild(name);
            var props = Props.Create <GuardianActor>(UserGuardianSupervisorStrategy);

            var userGuardian = new LocalActorRef(_system, props, DefaultDispatcher, _defaultMailbox, rootGuardian, RootPath / name);

            cell.InitChild(userGuardian);
            userGuardian.Start();
            return(userGuardian);
        }
예제 #4
0
        private LocalActorRef CreateSystemGuardian(LocalActorRef rootGuardian, string name, LocalActorRef userGuardian)     //Corresponds to Akka's: override lazy val guardian: systemGuardian
        {
            var cell = rootGuardian.Cell;
            cell.ReserveChild(name);
            var props = Props.Create(() => new SystemGuardianActor(userGuardian), _systemGuardianStrategy);

            var systemGuardian = new LocalActorRef(_system, props, DefaultDispatcher, _defaultMailbox, rootGuardian, RootPath / name);
            cell.InitChild(systemGuardian);
            systemGuardian.Start();
            return systemGuardian;
        }
예제 #5
0
        private LocalActorRef CreateUserGuardian(LocalActorRef rootGuardian, string name)   //Corresponds to Akka's: override lazy val guardian: LocalActorRef
        {
            var cell = rootGuardian.Cell;
            cell.ReserveChild(name);
            var props = Props.Create<GuardianActor>(UserGuardianSupervisorStrategy);

            var userGuardian = new LocalActorRef(_system, props, DefaultDispatcher, _defaultMailbox, rootGuardian, RootPath / name);
            cell.InitChild(userGuardian);
            userGuardian.Start();
            return userGuardian;
        }