private Sender( WritableNetworkService<GeneralGroupCommunicationMessage> networkService, IIdentifierFactory idFactory) { _networkService = networkService; _idFactory = idFactory; }
private Sender( WritableNetworkService <GeneralGroupCommunicationMessage> networkService, IIdentifierFactory idFactory) { _networkService = networkService; _idFactory = idFactory; }
public GroupCommClient( [Parameter(typeof(GroupCommConfigurationOptions.SerializedGroupConfigs))] ISet <string> groupConfigs, [Parameter(typeof(TaskConfigurationOptions.Identifier))] string taskId, WritableNetworkService <GeneralGroupCommunicationMessage> networkService, AvroConfigurationSerializer configSerializer, IInjector injector) { _commGroups = new Dictionary <string, ICommunicationGroupClient>(); _networkService = networkService; networkService.Register(new StringIdentifier(taskId)); foreach (string serializedGroupConfig in groupConfigs) { IConfiguration groupConfig = configSerializer.FromString(serializedGroupConfig); IInjector groupInjector = injector.ForkInjector(groupConfig); ICommunicationGroupClient commGroupClient = groupInjector.GetInstance <ICommunicationGroupClient>(); _commGroups[commGroupClient.GroupName] = commGroupClient; } }
public GroupCommClient( [Parameter(typeof(GroupCommConfigurationOptions.SerializedGroupConfigs))] ISet<string> groupConfigs, [Parameter(typeof(TaskConfigurationOptions.Identifier))] string taskId, WritableNetworkService<GeneralGroupCommunicationMessage> networkService, AvroConfigurationSerializer configSerializer, IInjector injector) { _commGroups = new Dictionary<string, ICommunicationGroupClient>(); _networkService = networkService; networkService.Register(new StringIdentifier(taskId)); foreach (string serializedGroupConfig in groupConfigs) { IConfiguration groupConfig = configSerializer.FromString(serializedGroupConfig); IInjector groupInjector = injector.ForkInjector(groupConfig); ICommunicationGroupClient commGroupClient = groupInjector.GetInstance<ICommunicationGroupClient>(); _commGroups[commGroupClient.GroupName] = commGroupClient; } }
private OperatorTopology( [Parameter(typeof(GroupCommConfigurationOptions.OperatorName))] string operatorName, [Parameter(typeof(GroupCommConfigurationOptions.CommunicationGroupName))] string groupName, [Parameter(typeof(TaskConfigurationOptions.Identifier))] string taskId, [Parameter(typeof(GroupCommConfigurationOptions.DriverId))] string driverId, [Parameter(typeof(GroupCommConfigurationOptions.Timeout))] int timeout, [Parameter(typeof(GroupCommConfigurationOptions.RetryCount))] int retryCount, [Parameter(typeof(GroupCommConfigurationOptions.TopologyRootTaskId))] string rootId, [Parameter(typeof(GroupCommConfigurationOptions.TopologyChildTaskIds))] ISet <string> childIds, WritableNetworkService <GeneralGroupCommunicationMessage> networkService, Sender sender, IStreamingCodec <T> codec) { _operatorName = operatorName; _groupName = groupName; _selfId = taskId; _driverId = driverId; _timeout = timeout; _retryCount = retryCount; _nameClient = networkService.NamingClient; _sender = sender; _nodesWithData = new BlockingCollection <NodeStruct <T> >(); _children = new List <NodeStruct <T> >(); _idToNodeMap = new Dictionary <string, NodeStruct <T> >(); _codec = codec; if (_selfId.Equals(rootId)) { _parent = null; } else { _parent = new NodeStruct <T>(rootId); _idToNodeMap[rootId] = _parent; } foreach (var childId in childIds) { var node = new NodeStruct <T>(childId); _children.Add(node); _idToNodeMap[childId] = node; } }