public Root(IActorRegistry registry, IRootRemoteConfiguration rootConfiguration) { _registry = registry; if (string.IsNullOrEmpty(rootConfiguration.Adress)) { _process = _registry.Add(rootConfiguration.ActorFactory, null); } else { _process = _registry.Add(rootConfiguration.ActorFactory, rootConfiguration.Adress, null); } }
public IActorProcess SpawnChild(Func <IActor> actorFactory) { var child = _registry.Add(actorFactory, Configuration.Parent); _children.Add(child); return(child); }
private Task <T> SendInternal <T>(string target, IMessage message, Future <T> future) { var targetProcess = _registry.Get(target); var futureProcess = _registry.Add(() => future, ActorType.Future, _process); targetProcess.Post(message, futureProcess); return(future.UnderlyingTask); }
public IActorProcess Spawn(Func <IActor> actorFactory, string adress) { return(_registry.Add(actorFactory, adress, null)); }
public IActorProcess Spawn(Func <IActor> actorFactory, string adress) { return(_registry.Add(actorFactory, adress, ActorType.Remote, _process)); }