public override IEnumerable <Routee> GetRoutees(RoutedActorCell routedActorCell) { if (_paths == null) { return(new Routee[0]); } return(_paths.Select(((ActorSystemImpl)routedActorCell.System).ActorSelection).Select(actor => new ActorSelectionRoutee(actor))); }
public override IEnumerable <Routee> GetRoutees(RoutedActorCell routedActorCell) { for (var i = 0; i < NrOfInstances; i++) { //TODO: where do we get props? yield return(NewRoutee(Actor.Props.Empty, routedActorCell)); } }
protected override ActorCell NewCell() { var pool = _routerProps.RouterConfig as Pool; ActorCell cell = null; if(pool != null) { if(pool.Resizer != null) { //if there is a resizer, use ResizablePoolCell cell = new ResizablePoolCell(_system, this, _routerProps, _routerDispatcher, _routeeProps, _supervisor, pool); } } if(cell == null) cell = new RoutedActorCell(_system, this, _routerProps, _routerDispatcher, _routeeProps, _supervisor); cell.Init(sendSupervise: false, createMailbox: _createMailbox); return cell; }
protected override ActorCell NewCell() { var pool = Props.RouterConfig as Pool; ActorCell cell = null; if (pool != null) { if (pool.Resizer != null) { cell = new ResizablePoolCell(System, this, Props, Dispatcher, _routeeProps, Supervisor, pool); } } if (cell == null) { cell = new RoutedActorCell(System, this, Props, Dispatcher, _routeeProps, Supervisor); } cell.Init(false, MailboxType); return cell; }
/// <summary> /// TBD /// </summary> /// <returns>TBD</returns> protected override ActorCell NewCell() { var pool = Props.RouterConfig as Pool; ActorCell cell = null; if (pool != null) { if (pool.Resizer != null) { cell = new ResizablePoolCell(System, this, Props, Dispatcher, _routeeProps, Supervisor, pool); } } if (cell == null) { cell = new RoutedActorCell(System, this, Props, Dispatcher, _routeeProps, Supervisor); } cell.Init(false, MailboxType); return(cell); }
protected override ActorCell NewCell() { var pool = _routerProps.RouterConfig as Pool; ActorCell cell = null; if (pool != null) { if (pool.Resizer != null) { //if there is a resizer, use ResizablePoolCell cell = new ResizablePoolCell(_system, this, _routerProps, _routerDispatcher, _routeeProps, _supervisor, pool); } } if (cell == null) { cell = new RoutedActorCell(_system, this, _routerProps, _routerDispatcher, _routeeProps, _supervisor); } cell.Init(sendSupervise: false, createMailbox: _createMailbox); return(cell); }
public abstract IEnumerable <Routee> GetRoutees(RoutedActorCell routedActorCell);
private static InternalActorRef LocalActorOf(ActorSystem system, Props props, InternalActorRef supervisor, ActorPath path, Mailbox mailbox) { ActorCell cell = null; if (props.RouterConfig is NoRouter || props.RouterConfig == null) //TODO: should not need nullcheck here { cell = new ActorCell(system, supervisor, props, path, mailbox); } else { var routeeProps = props.WithRouter(RouterConfig.NoRouter); cell = new RoutedActorCell(system, supervisor, props, routeeProps, path, mailbox); } cell.NewActor(); // parentContext.Watch(cell.Self); return cell.Self; }
public override IEnumerable<Routee> GetRoutees(RoutedActorCell routedActorCell) { throw new NotImplementedException(); }
public abstract IEnumerable<Routee> GetRoutees(RoutedActorCell routedActorCell);
public override IEnumerable<Routee> GetRoutees(RoutedActorCell routedActorCell) { for (int i = 0; i < NrOfInstances; i++) { //TODO: where do we get props? yield return NewRoutee(Akka.Actor.Props.Empty , routedActorCell); } }
public override IEnumerable <Routee> GetRoutees(RoutedActorCell routedActorCell) { return(paths.Select(routedActorCell.System.ActorSelection).Select(actor => new ActorSelectionRoutee(actor))); }
public RoutedActorRef( ActorPath path, RoutedActorCell context) : base(path, context) { this.cell = context; }
public override IEnumerable <Routee> GetRoutees(RoutedActorCell routedActorCell) { throw new NotSupportedException(); }
public override IEnumerable<Routee> GetRoutees(RoutedActorCell routedActorCell) { return paths.Select(routedActorCell.System.ActorSelection).Select(actor => new ActorSelectionRoutee(actor)); }
/// <summary> /// Actors the of. /// </summary> /// <param name="system">The system.</param> /// <param name="props">The props.</param> /// <param name="supervisor">The supervisor.</param> /// <param name="path">The path.</param> /// <returns>InternalActorRef.</returns> public override InternalActorRef ActorOf(ActorSystem system, Props props, InternalActorRef supervisor, ActorPath path) { ActorCell cell = null; Mailbox mailbox = System.Mailboxes.FromConfig(props.Mailbox); Deploy configDeploy = System.Provider.Deployer.Lookup(path); var deploy = configDeploy ?? props.Deploy ?? Deploy.None; if (deploy.Mailbox != null) props = props.WithMailbox(deploy.Mailbox); if (deploy.Dispatcher != null) props = props.WithDispatcher(deploy.Dispatcher); if (deploy.Scope is RemoteScope) { } if (string.IsNullOrEmpty(props.Mailbox)) { // throw new NotSupportedException("Mailbox can not be configured as null or empty"); } if (string.IsNullOrEmpty(props.Dispatcher)) { //TODO: fix this.. // throw new NotSupportedException("Dispatcher can not be configured as null or empty"); } if (props.Deploy != null && props.Deploy.Scope is RemoteScope) { throw new NotSupportedException("LocalActorRefProvider can not deploy remote"); } if (props.RouterConfig is NoRouter || props.RouterConfig == null) { props = props.WithDeploy(deploy); cell = new ActorCell(system, supervisor, props, path, mailbox); } else { //if no Router config value was specified, override with procedural input if (deploy.RouterConfig is NoRouter) { deploy = deploy.WithRouterConfig(props.RouterConfig); } var routerProps = Props.Create<RouterActor>() .WithDeploy(deploy); var routeeProps = props.WithRouter(RouterConfig.NoRouter); cell = new RoutedActorCell(system, supervisor, routerProps, routeeProps, path, mailbox); } cell.NewActor(); // parentContext.Watch(cell.Self); return cell.Self; }
public RoutedActorRef(ActorPath path, RoutedActorCell context) : base(path, context) { this.cell = context; }