Пример #1
0
        private ReduceReceiver(
            [Parameter(typeof(GroupCommConfigurationOptions.OperatorName))] string operatorName,
            [Parameter(typeof(GroupCommConfigurationOptions.CommunicationGroupName))] string groupName,
            [Parameter(typeof(GroupCommConfigurationOptions.Initialize))] bool initialize,
            OperatorTopology <PipelineMessage <T> > topology,
            ICommunicationGroupNetworkObserver networkHandler,
            IReduceFunction <T> reduceFunction,
            IPipelineDataConverter <T> dataConverter)
        {
            OperatorName          = operatorName;
            GroupName             = groupName;
            Version               = PipelineVersion;
            ReduceFunction        = reduceFunction;
            PipelineDataConverter = dataConverter;

            _pipelinedReduceFunc = new PipelinedReduceFunction <T>(ReduceFunction);
            _topology            = topology;

            var msgHandler = Observer.Create <GeneralGroupCommunicationMessage>(message => topology.OnNext(message));

            networkHandler.Register(operatorName, msgHandler);

            if (initialize)
            {
                topology.Initialize();
            }
        }
Пример #2
0
        private ScatterSender(
            [Parameter(typeof(GroupCommConfigurationOptions.OperatorName))] string operatorName,
            [Parameter(typeof(GroupCommConfigurationOptions.CommunicationGroupName))] string groupName,
            [Parameter(typeof(GroupCommConfigurationOptions.Initialize))] bool initialize,
            OperatorTopology <T> topology,
            ICommunicationGroupNetworkObserver networkHandler)
        {
            OperatorName = operatorName;
            GroupName    = groupName;
            Version      = DefaultVersion;
            _topology    = topology;

            var msgHandler = Observer.Create <GeneralGroupCommunicationMessage>(message => topology.OnNext(message));

            networkHandler.Register(operatorName, msgHandler);

            if (initialize)
            {
                topology.Initialize();
            }
        }
Пример #3
0
        private BroadcastSender(
            [Parameter(typeof(GroupCommConfigurationOptions.OperatorName))] string operatorName,
            [Parameter(typeof(GroupCommConfigurationOptions.CommunicationGroupName))] string groupName,
            [Parameter(typeof(GroupCommConfigurationOptions.Initialize))] bool initialize,
            OperatorTopology <PipelineMessage <T> > topology,
            ICommunicationGroupNetworkObserver networkHandler,
            IPipelineDataConverter <T> dataConverter)
        {
            _topology             = topology;
            OperatorName          = operatorName;
            GroupName             = groupName;
            Version               = PipelineVersion;
            PipelineDataConverter = dataConverter;

            var msgHandler = Observer.Create <GeneralGroupCommunicationMessage>(message => topology.OnNext(message));

            networkHandler.Register(operatorName, msgHandler);

            if (initialize)
            {
                topology.Initialize();
            }
        }