コード例 #1
0
ファイル: FactoryActor.cs プロジェクト: kgeis/BeeHive
        public FactoryActor(IServiceLocator serviceLocator, 
            IEventQueueOperator queueOperator)
        {
            _queueOperator = queueOperator;
            _serviceLocator = serviceLocator;

        }
コード例 #2
0
ファイル: Orchestrator.cs プロジェクト: adamhathcock/BeeHive
 public Orchestrator(IActorConfiguration configuration,
                     IEventQueueOperator queueOperator,
                     IServiceLocator serviceLocator)
 {
     _queueOperator  = queueOperator;
     _serviceLocator = serviceLocator;
     _configuration  = configuration;
 }
コード例 #3
0
 public PulserPublisher(IEventQueueOperator queueOperator, params IPulser[] pulsers)
 {
     _queueOperator = queueOperator;
     foreach (var pulser in pulsers)
     {
         pulser.PulseGenerated += pulser_PulseGenerated;
     }
 }
コード例 #4
0
ファイル: PulserPublisher.cs プロジェクト: csuffyy/BeeHive
 public PulserPublisher(IEventQueueOperator queueOperator, params IPulser[] pulsers)
 {
     _queueOperator = queueOperator;
     foreach (var pulser in pulsers)
     {
         pulser.PulseGenerated +=pulser_PulseGenerated;
     }
 }
コード例 #5
0
ファイル: Orchestrator.cs プロジェクト: csuffyy/BeeHive
        public Orchestrator(IActorConfiguration configuration, 
            IEventQueueOperator queueOperator,
            IServiceLocator serviceLocator)
        {
            _queueOperator = queueOperator;
            _serviceLocator = serviceLocator;
            _configuration = configuration;
 
        }
コード例 #6
0
 public MasterScheduler(IEventQueueOperator eventQueueOperator,
                        IConfigurationValueProvider configurationValueProvider,
                        ISourceConfiguration sourceConfiguration,
                        IElasticsearchClient elasticsearchClient,
                        IServiceLocator locator)
 {
     _sourceConfiguration        = sourceConfiguration;
     _locator                    = locator;
     _elasticsearchClient        = elasticsearchClient;
     _configurationValueProvider = configurationValueProvider;
     _eventQueueOperator         = eventQueueOperator;
 }
コード例 #7
0
 public MasterScheduler(IEventQueueOperator eventQueueOperator, 
     IConfigurationValueProvider configurationValueProvider,
     ISourceConfiguration sourceConfiguration,
     IElasticsearchClient elasticsearchClient,
     IServiceLocator locator)
 {
     _sourceConfiguration = sourceConfiguration;
     _locator = locator;
     _elasticsearchClient = elasticsearchClient;
     _configurationValueProvider = configurationValueProvider;
     _eventQueueOperator = eventQueueOperator;
  }
コード例 #8
0
        internal async static Task ProcessEvent(IProcessorActor actor, Event ev, IEventQueueOperator queueOperator)
        {
            var events = (await actor.ProcessAsync(ev)).ToArray(); // the enumerable has to be turned into a list anyway. it does further on
            var groups = events.GroupBy(x => x.QueueName);

            foreach (var gr in groups)
            {
                await queueOperator.PushBatchAsync(gr);

                TryDisposeMessages(gr);
            }
        }
コード例 #9
0
        public MasterScheduler(IEventQueueOperator eventQueueOperator,
                               IConfigurationValueProvider configurationValueProvider,
                               ILockStore lockStore)
        {
            _lockStore          = lockStore;
            _eventQueueOperator = eventQueueOperator;
            var tscn    = configurationValueProvider.GetValue(ConfigurationKeys.TableStorageConnectionString);
            var account = CloudStorageAccount.Parse(tscn);
            var client  = account.CreateCloudTableClient();

            _table = client.GetTableReference(configurationValueProvider.GetValue(ConfigurationKeys.SourceTableName));
            _table.CreateIfNotExistsAsync();
            _clustername = configurationValueProvider.GetValue(ConfigurationKeys.ClusterName);
        }
コード例 #10
0
 public MasterScheduler(IEventQueueOperator eventQueueOperator,
                        IConfigurationValueProvider configurationValueProvider,
                        ISourceConfiguration sourceConfiguration,
                        IElasticsearchClient elasticsearchClient,
                        IServiceLocator locator,
                        ILockStore lockStore,
                        ITelemetryProvider telemetryProvider,
                        IIndexNamer indexNamer,
                        IKeyValueStore keyValueStore)
 {
     _keyValueStore                = keyValueStore;
     _indexNamer                   = indexNamer;
     _lockStore                    = lockStore;
     _telemetryProvider            = telemetryProvider;
     _sourceConfiguration          = sourceConfiguration;
     _locator                      = locator;
     _elasticsearchClient          = elasticsearchClient;
     _configurationValueProvider   = configurationValueProvider;
     _eventQueueOperator           = eventQueueOperator;
     _scheduleDurationInstrumentor = telemetryProvider.GetInstrumentor <MasterScheduler>();
 }
コード例 #11
0
ファイル: WorkerRole.cs プロジェクト: lanicon/BeeHive
        public override bool OnStart()
        {
            // Set the maximum number of concurrent connections
            ServicePointManager.DefaultConnectionLimit = 1200;

            // For information on handling configuration changes
            // see the MSDN topic at http://go.microsoft.com/fwlink/?LinkId=166357.

            var container = new WindsorContainer();

            ConfigureDI(container);

            _orchestrator = container.Resolve <Orchestrator>();
            _orchestrator.SetupAsync().Wait();
            _orchestrator.Start();

            _queueOperator = container.Resolve <IEventQueueOperator>();
            _orderStore    = container.Resolve <ICollectionStore <Order> >();
            _customerStore = container.Resolve <ICollectionStore <Customer> >();


            return(base.OnStart());
        }
コード例 #12
0
ファイル: FactoryActor.cs プロジェクト: lulzzz/BeeHive
 public FactoryActor(IServiceLocator serviceLocator,
                     IEventQueueOperator queueOperator)
 {
     _queueOperator  = queueOperator;
     _serviceLocator = serviceLocator;
 }
コード例 #13
0
        public static Task DirectCallToActor(IProcessorActor actor, QueueName queueName, Message msg, IEventQueueOperator queueOperator)
        {
            var ev = msg.ToEvent(queueName);

            return(FactoryActor.ProcessEvent(actor, ev, queueOperator));
        }
コード例 #14
0
        public static Task Invoke(this IProcessorActor actor, QueueName queueName, Message msg, IEventQueueOperator queueOperator)
        {
            var ev = msg.ToEvent(queueName);

            return(FactoryActor.ProcessEvent(actor, ev, queueOperator));
        }
コード例 #15
0
ファイル: WorkerRole.cs プロジェクト: csuffyy/BeeHive
        public override bool OnStart()
        {
            // Set the maximum number of concurrent connections 
            ServicePointManager.DefaultConnectionLimit = 1200;

            // For information on handling configuration changes
            // see the MSDN topic at http://go.microsoft.com/fwlink/?LinkId=166357.

            var container = new WindsorContainer();
            ConfigureDI(container);

            _orchestrator = container.Resolve<Orchestrator>();
            _orchestrator.SetupAsync().Wait();
            _orchestrator.Start();

            _queueOperator = container.Resolve<IEventQueueOperator>();
            _orderStore = container.Resolve<ICollectionStore<Order>>();
            _customerStore = container.Resolve<ICollectionStore<Customer>>();


            return base.OnStart();
        }