public override void Flush(System.Collections.IDictionary threadsAndFields, SegmentWriteState state) { System.Collections.IDictionary oneThreadsAndFields = new System.Collections.Hashtable(); System.Collections.IDictionary twoThreadsAndFields = new System.Collections.Hashtable(); System.Collections.IEnumerator it = new System.Collections.Hashtable(threadsAndFields).GetEnumerator(); while (it.MoveNext()) { System.Collections.DictionaryEntry entry = (System.Collections.DictionaryEntry)it.Current; DocFieldConsumersPerThread perThread = (DocFieldConsumersPerThread)entry.Key; System.Collections.ICollection fields = (System.Collections.ICollection)entry.Value; System.Collections.IEnumerator fieldsIt = fields.GetEnumerator(); System.Collections.Hashtable oneFields = new System.Collections.Hashtable(); System.Collections.Hashtable twoFields = new System.Collections.Hashtable(); while (fieldsIt.MoveNext()) { DocFieldConsumersPerField perField = (DocFieldConsumersPerField)fieldsIt.Current; SupportClass.CollectionsHelper.AddIfNotContains(oneFields, perField.one); SupportClass.CollectionsHelper.AddIfNotContains(twoFields, perField.two); } oneThreadsAndFields[perThread.one] = oneFields; twoThreadsAndFields[perThread.two] = twoFields; } one.Flush(oneThreadsAndFields, state); two.Flush(twoThreadsAndFields, state); }
public DocFieldConsumersPerField(DocFieldConsumersPerThread perThread, DocFieldConsumerPerField one, DocFieldConsumerPerField two) { this.perThread = perThread; this.one = one; this.two = two; }