public override void Configure(INodeConfiguration configuration) { var c = configuration as MockNodeConfiguration; Max = c.Max; Min = c.Min; base.Configure(configuration); }
public RabbitNodeChannelManager(INodeConfiguration nodeConfiguration, INodeHealthMonitor nodeMonitor, INodeRegistry nodeRegistry, IBus bus) { NodeConfiguration = nodeConfiguration; NodeMonitor = nodeMonitor; NodeRegistry = nodeRegistry; Bus = bus; }
public override void Configure(INodeConfiguration configuration) { var c = configuration as Sinumerik840dNodeConfiguration; NCVar = new NC_Var(); base.Configure(configuration); }
public RabbitNodeChannelManager( INodeConfiguration nodeConfiguration, INodeHealthMonitor nodeMonitor, INodeRegistry nodeRegistry, IBus bus ) { NodeConfiguration = nodeConfiguration; NodeMonitor = nodeMonitor; NodeRegistry = nodeRegistry; Bus = bus; }
public NodeHealthMonitor( INodeConfiguration configuration, IEnumerable<INodeHealthBroadcaster> broadcasters ) { Observers = new ObserverCollection<NodeHealth>(); Configuration = configuration; UpdateTimer = new Timer( Configuration.HealthMonitorFrequency.TotalMilliseconds ); UpdateTimer.Elapsed += UpdateHealth; broadcasters .ForEach( x => Subscribe( x ) ); }
public NodeHealthMonitor(INodeConfiguration configuration, IEnumerable <INodeHealthBroadcaster> broadcasters) { Observers = new ObserverCollection <NodeHealth>(); Configuration = configuration; UpdateTimer = new Timer(Configuration.HealthMonitorFrequency.TotalMilliseconds); UpdateTimer.Elapsed += UpdateHealth; broadcasters .ForEach(x => Subscribe(x)); }
private void InitializeCommunicationLayer() { INodeConfiguration nodeConfiguration = _configurationService.Get <INodeConfiguration>(); foreach (string communicationServiceName in nodeConfiguration.CommunicationServices) { CommunicationConfigurationBase communicationConfiguration = (CommunicationConfigurationBase)_configurationService[communicationServiceName]; IServerCommunicationService serverCommunicationService = _communicationServicesFactory.GetInstance(communicationConfiguration.CommunicationServiceName); serverCommunicationService.Init(new SocketListenerSettings(communicationConfiguration.MaxConnections, communicationConfiguration.ReceiveBufferSize, new IPEndPoint(IPAddress.Any, communicationConfiguration.ListeningPort))); _communicationServicesRegistry.RegisterInstance(serverCommunicationService, communicationConfiguration.CommunicationServiceName); } _packetsHandler.Initialize(_cancellationTokenSource.Token); }
//----------------------------------------------------------------------------------------------------------------------------------------------------- public ThreadLog( IFramework framework, IClock clock, IThreadRegistry registry, IThreadLogAnchor anchor, ThreadTaskType taskType, ActivityLogNode rootActivity) { _registry = registry; _anchor = anchor; _taskType = taskType; _rootActivity = rootActivity; _currentActivity = rootActivity; _startedAtUtc = framework.UtcNow; _logId = framework.NewGuid(); _correlationId = _logId; _node = framework.CurrentNode; _clock = clock; _rootActivity.AttachToThreadLog(this, parent: null); _registry.ThreadStarted(this); }
internal void Start() { INodeConfiguration nodeConfiguration = _configurationService.Get <INodeConfiguration>(); foreach (string communicationServiceName in nodeConfiguration.CommunicationServices) { CommunicationConfigurationBase communicationConfiguration = (CommunicationConfigurationBase)_configurationService[communicationServiceName]; _communicationServicesRegistry.GetInstance(communicationConfiguration.CommunicationServiceName).Start(); } _packetsHandler.Start(); foreach (IModule module in _modulesRepository.GetBulkInstances()) { module.Start(); } }
private void ObtainConfiguredModules() { INodeConfiguration nodeConfiguration = _configurationService.Get <INodeConfiguration>(); string[] moduleNames = nodeConfiguration.Modules; if (moduleNames != null) { foreach (string moduleName in moduleNames) { try { IModule module = _modulesRepository.GetInstance(moduleName); _modulesRepository.RegisterInstance(module); } catch (Exception ex) { _log.Error($"Failed to register Module with name '{moduleName}'.", ex); } } } }
public Node(INodeRegistry nodes, IBus bus, INodeConfiguration configuration) { Nodes = nodes; Bus = bus; Configuration = configuration; }
public NodeHealthBroadcaster( INodeConfiguration configuration, IBus bus ) { Configuration = configuration; Bus = bus; }
public NodeHealthBroadcaster(INodeConfiguration configuration, IBus bus) { Configuration = configuration; Bus = bus; }
public RabbitConfiguration( INodeConfiguration nodeConfiguration ) { NodeConfiguration = nodeConfiguration; Brokers = new ConcurrentDictionary<string, IRabbitBroker>(); }
public RabbitConfiguration(INodeConfiguration nodeConfiguration) { NodeConfiguration = nodeConfiguration; Brokers = new ConcurrentDictionary <string, IRabbitBroker>(); }
public virtual void Configure(INodeConfiguration configuration) { Configuration = configuration; }
public NodeConfigurator( INodeConfiguration configuration ) { Configuration = configuration; }
public NodeConfigurator(INodeConfiguration configuration) { Configuration = configuration; }
public void AddNewNode(INodeConfiguration slave) { if (slave == null) { throw new ArgumentNullException("slave"); } lock (m_SyncRoot) { RemoveDeadNodes(); if (m_Nodes.Contains(slave)) { throw new ArgumentException("cannot add node. Server ID already exists"); } // if (slave.IsMaster && m_Nodes.Any(n => n.IsMaster)) { throw new ArgumentException("Cannot add second master node"); } // m_Nodes.Add(slave); m_DeadNodes.Add(false); } }