public static ActorSystemEventRepository New(IActorSystemFactory factory, EventsAdaptersCatalog eventsAdaptersCatalog) { var actorSystem = factory.Create(); actorSystem.InitDomainEventsSerialization(eventsAdaptersCatalog); return(new ActorSystemEventRepository(actorSystem)); }
public GridDomainNode(IEnumerable <IDomainConfiguration> domainConfigurations, IActorSystemFactory actorSystemFactory, ILogger log, TimeSpan?defaultTimeout = null) { DomainConfigurations = domainConfigurations.ToList(); if (!DomainConfigurations.Any()) { throw new NoDomainConfigurationException(); } DefaultTimeout = defaultTimeout ?? TimeSpan.FromSeconds(10); Log = log; _actorSystemFactory = actorSystemFactory; }
public GridDomainNode(IEnumerable <IDomainConfiguration> domainConfigurations, IActorSystemFactory actorSystemFactory, ILogger log, TimeSpan defaultTimeout) { _domainConfigurations = domainConfigurations.ToList(); if (!_domainConfigurations.Any()) { throw new NoDomainConfigurationException(); } if (_domainConfigurations.Any(d => d == null)) { throw new InvalidDomainConfigurationException(); } DefaultTimeout = defaultTimeout; Log = log; _actorSystemFactory = actorSystemFactory; }
public GridDomainNode(IActorSystemFactory actorSystemFactory, ILogger log, TimeSpan timeout, params IDomainConfiguration[] domainConfigurations) : this(domainConfigurations, actorSystemFactory, log, timeout) { }
public GridDomainNode(IActorSystemFactory actorSystemFactory, params IDomainConfiguration[] domainConfigurations) : this(domainConfigurations, actorSystemFactory, new DefaultLoggerConfiguration().CreateLogger().ForContext <GridDomainNode>()) { }
public StatsActorSystemService(IActorSystemFactory actorSystemFactory) { StatsActorSystem = actorSystemFactory.Create("StatsCoordinatorActor"); statActorRef = StatsActorSystem.ActorOf(StatsActorSystem.DI().Props<StatsCoordinatorActor>() .WithRouter(new RoundRobinPool(2)), "StatsCoordinatorActor"); }
public TAkkaBuilderConfiguration UsingActorSystemFactory <TActorSystemFactory>() where TActorSystemFactory : IActorSystemFactory, new() { Factory = new TActorSystemFactory(); return(this as TAkkaBuilderConfiguration); }