예제 #1
0
        internal WorkerHostedService(IWorker worker,
                                     IHeartbeatManager heartbeatManager,
                                     StepFunctionsConfig config,
                                     AmazonStepFunctionsClient client,
                                     ILoggerFactory loggerFactory)
        {
            _heartbeatManager = heartbeatManager;
            _logger           = loggerFactory.CreateLogger <WorkerHostedService>();
            LoggerFactory     = loggerFactory;
            Client            = client;
            Worker            = worker;
            Config            = config;

            _logger.LogDebug($"Creating TaskWorkerHostedService: '{worker.ActivityName}'");
        }
예제 #2
0
 public InternalBus(IMessageSender messageSender, IBusBootstrapper busBootstrapper, IDataReceiver dataReceiver, HandlingProcessorStandard handlingProcessorStandard, HandlingProcessorInfrastructure handlingProcessorInfrastructure, PersistenceSynchronizationProcessor networkProcessor, MessageTargetsHandler messageTargetsHandler, NetworkSender networkSender, IHeartbeatManager heartbeatManager, IQueueConfiguration queueConfiguration)
 {
     _messageSender = messageSender;
     _busBootstrapper = busBootstrapper;
     _dataReceiver = dataReceiver;
     _handlingProcessorStandard = handlingProcessorStandard;
     _handlingProcessorInfrastructure = handlingProcessorInfrastructure;
     _networkProcessor = networkProcessor;
     _messageTargetsHandler = messageTargetsHandler;
     _networkSender = networkSender;
     _heartbeatManager = heartbeatManager;
     _queueConfiguration = queueConfiguration;
     _networkInputDisruptor = new Disruptor<InboundMessageProcessingEntry>(() => new InboundMessageProcessingEntry(),new MultiThreadedClaimStrategy(_queueConfiguration.InboundQueueSize), new SleepingWaitStrategy(), new RoundRobinThreadAffinedTaskScheduler(3));
     _outputDisruptor = new Disruptor<OutboundDisruptorEntry>(() => new OutboundDisruptorEntry(), new MultiThreadedClaimStrategy(_queueConfiguration.OutboundQueueSize), new SleepingWaitStrategy(), new RoundRobinThreadAffinedTaskScheduler(2));
 }
예제 #3
0
 public PeerManager(IPeerConfiguration peerConfig, IHeartbeatManager heartbeatManager)
 {
     _peerConfig = peerConfig;
     _heartbeatManager = heartbeatManager;
     _heartbeatManager.Disconnected += OnHeartbeatManagerDisconnected;
 }