Exemple #1
0
 public FrontendRoutingService(ISinkFactory <IMessage> sinkFactory, INotifierFactory notifierFactory)
 {
     this.sinkFactory     = Preconditions.CheckNotNull(sinkFactory, nameof(sinkFactory));
     this.notifierFactory = Preconditions.CheckNotNull(notifierFactory, nameof(notifierFactory));
     this.closed          = new AtomicBoolean(false);
     this.cts             = new CancellationTokenSource();
     this.sinks           = new AtomicReference <ImmutableDictionary <string, ISink <IMessage> > >(ImmutableDictionary <string, ISink <IMessage> > .Empty);
     this.notifiers       = new AtomicReference <ImmutableDictionary <string, INotifier> >(ImmutableDictionary <string, INotifier> .Empty);
 }
Exemple #2
0
 public static PenguinProcessor CreateProcessor(PingConfiguration configuration,
                                                DbSettings databaseSettings,
                                                INotifierFactory notifierFactory,
                                                ITransformerFactory transformerFactory)
 {
     return(new PenguinProcessor(configuration,
                                 new PenguinRepository(databaseSettings),
                                 new PenguinResultsRepository(databaseSettings),
                                 notifierFactory,
                                 transformerFactory));
 }
        public FilteringRoutingService(IRoutingService underlying, IRouteStore routeStore, INotifierFactory notifierFactory, IRouteCompiler compiler)
        {
            this.underlying      = Preconditions.CheckNotNull(underlying, nameof(underlying));
            this.routeStore      = Preconditions.CheckNotNull(routeStore, nameof(routeStore));
            this.notifierFactory = Preconditions.CheckNotNull(notifierFactory, nameof(notifierFactory));
            this.compiler        = Preconditions.CheckNotNull(compiler, nameof(compiler));

            this.evaluators = new AtomicReference <ImmutableDictionary <string, Evaluator> >(ImmutableDictionary <string, Evaluator> .Empty);
            this.notifiers  = new AtomicReference <ImmutableDictionary <string, INotifier> >(ImmutableDictionary <string, INotifier> .Empty);
            this.cts        = new CancellationTokenSource();
            this.closed     = new AtomicBoolean(false);
            this.sync       = new AsyncLock();
        }
 public FilteringRoutingService(IRoutingService underlying, IRouteStore routeStore, INotifierFactory notifierFactory)
     : this(underlying, routeStore, notifierFactory, RouteCompiler.Instance)
 {
 }
Exemple #5
0
        public PenguinProcessor(IPingConfiguration config, IPenguinRepository penguinRepoi, IPenguinResultsRepository resultsRepo, INotifierFactory notifierFactory, ITransformerFactory transformerfactory)
        {
            _httpClientPinger = new HttpClientPinger(config);
            _urlRepo          = penguinRepoi;
            _resultsRepo      = resultsRepo;

            _transformer = transformerfactory.CreateTransformer();
            _notifier    = notifierFactory.CreateNotifier();
        }
Exemple #6
0
 public ChristmasPickMessenger(INotifierFactory notifierFactory)
 {
     _notifierFactory = notifierFactory ?? throw new ArgumentNullException(nameof(notifierFactory));
 }