public MessageContext(IActorProcess actor, IEvent message, ICanPost sender, IActorRegistry actorRegistry) { Actor = actor; Message = message; Sender = sender; Registry = actorRegistry; }
public MessageContext(IActorProcess actor, IMessage message, ActorId sender, IActorRegistry actorRegistry) { Actor = actor; Message = message; Sender = sender; Registry = actorRegistry; }
public ActorProcessConfiguration(ActorId id, Func <IActor> actorFactory, IActorProcess parent, ActorType type) { Id = id; ActorFactory = actorFactory; Parent = parent; Type = type; }
public IActorProcess Add(Func <IActor> actorFactory, ActorType type, IActorProcess parent) { var id = NextId(string.Empty, type); var configuration = new ActorProcessConfiguration(id, actorFactory, parent, type); return(AddInternal <IActorProcess>(configuration)); }
public ReaderProvider(IActorProcess sender, IActorRegistry registry, ISerializer serializer) { _readerCache = new ConcurrentDictionary <ActorId, IReader>(); _writerCache = new ConcurrentDictionary <ActorId, IWriter>(); _serializer = serializer; _registry = registry; _sender = sender; }
public RemoteReaderEndpoint(IActorProcess process, ISerializer serializer) { _server = new Server { Services = { Reader.BindService(new RemoteReaderService(process, serializer)) }, Ports = { new ServerPort(process.Configuration.Uri.Host, process.Configuration.Uri.Port, ServerCredentials.Insecure) } }; _server.Start(); }
public Task HandleFailure(IActorProcess self, Failure failure) { self.Post(new Restart(self.Configuration.Id.Value, failure.Reason), self); foreach (var child in self.Children) { child.Post(new Restart(child.Configuration.Id.Value, failure.Reason), self); } return(Task.CompletedTask); }
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 BlockingCollectionMailbox(IActorProcess process, IActorRegistry registry) { _process = process; _registry = registry; }
public LocalWriter(IActorRegistry registry, IActorProcess process) { _registry = registry; _process = process; }
public RemoteReaderService(IActorProcess self, ISerializer serializer, IActorRegistry registry) { _serializer = serializer; _self = self; _registry = registry; }
public CommandHandler(IActorProcess actorProcess, IActorRegistry registry) { _actorProcess = actorProcess; _registry = registry; _pendingCommands = new Dictionary <Guid, TaskCompletionSource <ICommandResult> >(); }
public LocalReader(ActorId actorId, IActorRegistry registry, IActorProcess sender) { _target = registry.Get(actorId.Value); _sender = sender; }
public void Post(IMessage msg, IActorProcess sender) { var context = new MessageContext(_process, msg, sender.Configuration.Id, _registry); _messages.Add(context); }
public RemoteWriterService(IActorProcess actorProcess, ISerializer serializer) { _actorProcess = actorProcess; _serializer = serializer; }
public RemoteReaderService(IActorProcess self, ISerializer serializer) { _serializer = serializer; _self = self; }
public RemoteReader(IActorProcess actorProcess, ISerializer serializer) { _reader = new RemoteReaderEndpoint(actorProcess, serializer); }
public void Post(IMessage msg, IActorProcess sender) { _mailbox.Post(msg, sender); }