Exemple #1
0
 public MessageContext(IActorProcess actor, IMessage message, ActorId sender, IActorRegistry actorRegistry)
 {
     Actor    = actor;
     Message  = message;
     Sender   = sender;
     Registry = actorRegistry;
 }
 public MessageContext(IActorProcess actor, IEvent message, ICanPost sender, IActorRegistry actorRegistry)
 {
     Actor    = actor;
     Message  = message;
     Sender   = sender;
     Registry = actorRegistry;
 }
Exemple #3
0
        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, IActorRegistry registry)
        {
            _server = new Server
            {
                Services = { Transport.BindService(new RemoteReaderService(process, serializer, registry)) },
                Ports    = { new ServerPort(process.Configuration.Uri.Host, process.Configuration.Uri.Port, ServerCredentials.Insecure) }
            };

            _server.Start();
        }
Exemple #5
0
        public ActorProcess(
            IActorProcessConfiguration configuration,
            IActorRegistry registry,
            ISupervisorStrategy supervisionStrategy)
        {
            _registry            = registry;
            _supervisionStrategy = supervisionStrategy;
            _mailbox             = new BlockingCollectionMailbox(this, registry);

            Configuration = configuration;
            _children     = new List <IActorProcess>();
        }
Exemple #6
0
        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;
 }
Exemple #8
0
 public LocalWriter(IActorRegistry registry, IActorProcess process)
 {
     _registry = registry;
     _process  = process;
 }
Exemple #9
0
 public RemoteReaderService(IActorProcess self, ISerializer serializer, IActorRegistry registry)
 {
     _serializer = serializer;
     _self       = self;
     _registry   = registry;
 }
 public RemoteActorProcess(IActorProcessConfiguration configuration, IActorRegistry registry, ISupervisorStrategy supervisionStrategy, ISerializer serializer) : base(configuration, registry, supervisionStrategy)
 {
     _remoteReaderEndpoint = new RemoteReaderEndpoint(this, serializer, registry);
 }
Exemple #11
0
        //   private readonly Dictionary<string, ActorEndpoint> _endpointCache;

        public RemoteWriter(ActorId sender, IActorRegistry registry)
        {
            _registry = registry;
            _sender   = sender;
            //  _endpointCache = new Dictionary<string, ActorEndpoint>();
        }
 public LocalReader(ActorId actorId, IActorRegistry registry, IActorProcess sender)
 {
     _target = registry.Get(actorId.Value);
     _sender = sender;
 }
Exemple #13
0
 public World(IActorRegistry registry)
 {
     _registry = registry;
 }
Exemple #14
0
 public CommandHandler(IActorProcess actorProcess, IActorRegistry registry)
 {
     _actorProcess    = actorProcess;
     _registry        = registry;
     _pendingCommands = new Dictionary <Guid, TaskCompletionSource <ICommandResult> >();
 }