示例#1
0
        private UpdateTaskHost(
            IUpdateFunction <TMapInput, TMapOutput, TResult> updateTask,
            IGroupCommClient groupCommunicationsClient,
            IIMRUResultHandler <TResult> resultHandler,
            [Parameter(typeof(InvokeGC))] bool invokeGC)
        {
            _updateTask = updateTask;
            var cg = groupCommunicationsClient.GetCommunicationGroup(IMRUConstants.CommunicationGroupName);

            _dataAndControlMessageSender =
                cg.GetBroadcastSender <MapInputWithControlMessage <TMapInput> >(IMRUConstants.BroadcastOperatorName);
            _dataReceiver  = cg.GetReduceReceiver <TMapOutput>(IMRUConstants.ReduceOperatorName);
            _invokeGC      = invokeGC;
            _resultHandler = resultHandler;
        }
示例#2
0
 private UpdateTaskHost(
     IUpdateFunction <TMapInput, TMapOutput, TResult> updateTask,
     IGroupCommClient groupCommunicationsClient,
     IIMRUResultHandler <TResult> resultHandler,
     TaskCloseCoordinator taskCloseCoordinator,
     [Parameter(typeof(InvokeGC))] bool invokeGc,
     [Parameter(typeof(TaskConfigurationOptions.Identifier))] string taskId) :
     base(groupCommunicationsClient, taskCloseCoordinator, invokeGc)
 {
     Logger.Log(Level.Info, "Entering constructor of UpdateTaskHost for task id {0}", taskId);
     _updateTask = updateTask;
     _dataAndControlMessageSender =
         _communicationGroupClient.GetBroadcastSender <MapInputWithControlMessage <TMapInput> >(IMRUConstants.BroadcastOperatorName);
     _dataReceiver  = _communicationGroupClient.GetReduceReceiver <TMapOutput>(IMRUConstants.ReduceOperatorName);
     _resultHandler = resultHandler;
     Logger.Log(Level.Info, "UpdateTaskHost initialized.");
 }