コード例 #1
0
ファイル: TaskEnumerator.cs プロジェクト: wangchengqun/NCache
        public TaskEnumerator(List <Common.MapReduce.TaskEnumeratorResult> enumeratorResultSet,
                              TaskEnumeratorHandler remoteCache)
        {
            _partitionedEnumerators = new List <TaskPartitionedEnumerator>();
            foreach (Common.MapReduce.TaskEnumeratorResult result in enumeratorResultSet)
            {
                TaskPartitionedEnumerator mrResultPEnumerator = new TaskPartitionedEnumerator(remoteCache,
                                                                                              result.Pointer,
                                                                                              result.RecordSet,
                                                                                              result.NodeAddress,
                                                                                              result.IsLastResult);
                _partitionedEnumerators.Add(mrResultPEnumerator);
            }

            ValidatePEnumerator();
        }
コード例 #2
0
        public TaskPartitionedEnumerator(TaskEnumeratorHandler remoteCache, TaskEnumeratorPointer pntr,
                                         DictionaryEntry entry, string nodeaddress, bool isLast)
        {
            this.handler       = remoteCache;
            this.pointer       = pntr;
            this.nextRecordSet = entry;
            this.nodeAddress   = nodeaddress;
            this.isLastResult  = isLast;

            this.callbackId = pointer.CallbackId;

            if (nextRecordSet.Key != null)
            {
                isValid = true;
            }
        }