public MergingIterator(Comparator comparator, Iterator[] children) { comparator_ = comparator; children_ = new IteratorWrapper[children.Length]; current_ = null; direction_ = Direction.kForward; for (int i = 0; i < children.Length; i++) children_[i] = new IteratorWrapper(children[i]); }
public Iterator NewIterator(Comparator comparator) { if (size_ < 2 * sizeof(UInt32)) { return Iterator.NewErrorIterator(Status.Corruption("bad block contents")); } UInt32 num_restarts = NumRestarts(); if (num_restarts == 0) { return Iterator.EmptyIterator; } else { return new Iter(comparator, data_, restart_offset_, num_restarts); } }
public Iter(Comparator comparator, ByteArrayPointer data, UInt32 restarts, UInt32 num_restarts) { comparator_ = comparator; data_ = data; restarts_ = restarts; num_restarts_ = num_restarts; current_ = restarts_; restart_index_ = num_restarts_; Debug.Assert(num_restarts_ > 0); }
internal static Iterator NewMergingIterator(Comparator comparator, Iterator[] children) { Debug.Assert(children.Length >= 0); if (children.Length == 0) { return EmptyIterator; } else if (children.Length == 1) { return children[0]; } else { return new MergingIterator(comparator, children); } }
public InternalKeyComparator(Comparator c) { m_userComparator = c; }