Search Results for

    Show / Hide Table of Contents

    Class ZoneTreeIterator<TKey, TValue>

    Inheritance
    object
    ZoneTreeIterator<TKey, TValue>
    Implements
    IZoneTreeIterator<TKey, TValue>
    IDisposable
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Tenray.ZoneTree.Core
    Assembly: ZoneTree.dll
    Syntax
    public sealed class ZoneTreeIterator<TKey, TValue> : IZoneTreeIterator<TKey, TValue>, IDisposable
    Type Parameters
    Name Description
    TKey
    TValue

    Constructors

    | Improve this Doc View Source

    ZoneTreeIterator(ZoneTreeOptions<TKey, TValue>, ZoneTree<TKey, TValue>, IRefComparer<HeapEntry<TKey, TValue>>, bool, bool, bool, bool, bool, bool)

    Declaration
    public ZoneTreeIterator(ZoneTreeOptions<TKey, TValue> options, ZoneTree<TKey, TValue> zoneTree, IRefComparer<HeapEntry<TKey, TValue>> heapEntryComparer, bool autoRefresh, bool isReverseIterator, bool includeDeletedRecords, bool includeMutableSegment, bool includeDiskSegment, bool includeBottomSegments)
    Parameters
    Type Name Description
    ZoneTreeOptions<TKey, TValue> options
    ZoneTree<TKey, TValue> zoneTree
    IRefComparer<HeapEntry<TKey, TValue>> heapEntryComparer
    bool autoRefresh
    bool isReverseIterator
    bool includeDeletedRecords
    bool includeMutableSegment
    bool includeDiskSegment
    bool includeBottomSegments

    Properties

    | Improve this Doc View Source

    AutoRefresh

    If true, the iterator automatically refreshes itself to include the latest segments.

    Declaration
    public bool AutoRefresh { get; }
    Property Value
    Type Description
    bool
    | Improve this Doc View Source

    BottomSegments

    Declaration
    public IReadOnlyList<IDiskSegment<TKey, TValue>> BottomSegments { get; }
    Property Value
    Type Description
    IReadOnlyList<IDiskSegment<TKey, TValue>>
    | Improve this Doc View Source

    Current

    Gets the current element at the iterator's position.

    Declaration
    public KeyValuePair<TKey, TValue> Current { get; }
    Property Value
    Type Description
    KeyValuePair<TKey, TValue>
    | Improve this Doc View Source

    CurrentKey

    Returns the element key if there is an element in the iterator position.

    Declaration
    public TKey CurrentKey { get; }
    Property Value
    Type Description
    TKey
    | Improve this Doc View Source

    CurrentValue

    Returns the element value if there is an element in the iterator position.

    Declaration
    public TValue CurrentValue { get; }
    Property Value
    Type Description
    TValue
    | Improve this Doc View Source

    DiskSegment

    Declaration
    public IDiskSegment<TKey, TValue> DiskSegment { get; }
    Property Value
    Type Description
    IDiskSegment<TKey, TValue>
    | Improve this Doc View Source

    HasCurrent

    Returns true if there is an element in the iterator position.

    Declaration
    public bool HasCurrent { get; }
    Property Value
    Type Description
    bool

    Methods

    | Improve this Doc View Source

    Dispose()

    Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

    Declaration
    public void Dispose()
    | Improve this Doc View Source

    Next()

    Iterates to the next element.

    Declaration
    public bool Next()
    Returns
    Type Description
    bool

    true if next element exists, otherwise false.

    | Improve this Doc View Source

    Refresh()

    Refreshes the iterator with latest segments. If AutoRefresh property is true, there is no need to call refresh manually.

    Declaration
    public void Refresh()
    | Improve this Doc View Source

    Seek(in TKey)

    Seeks the iterator to the position where next item is the key. If key does not exist, forward iterator's next item is the first greater item (prefix search forward). reverse iterator's next item is the last smaller item (prefix search backward). Complexity: O(log(N))

    Declaration
    public void Seek(in TKey key)
    Parameters
    Type Name Description
    TKey key

    The search key

    | Improve this Doc View Source

    SeekFirst()

    Seeks the first element of the iterator.

    Declaration
    public void SeekFirst()
    | Improve this Doc View Source

    WaitUntilReadOnlySegmentsBecomeFullyFrozen()

    Declaration
    public void WaitUntilReadOnlySegmentsBecomeFullyFrozen()

    Implements

    IZoneTreeIterator<TKey, TValue>
    IDisposable
    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © 2022 Tenray.io