Search Results for

    Show / Hide Table of Contents

    Interface IDiskSegment<TKey, TValue>

    Inherited Members
    IReadOnlySegment<TKey, TValue>.SegmentId
    IReadOnlySegment<TKey, TValue>.Length
    IReadOnlySegment<TKey, TValue>.MaximumOpIndex
    IReadOnlySegment<TKey, TValue>.ContainsKey(in TKey)
    IReadOnlySegment<TKey, TValue>.TryGet(in TKey, out TValue)
    IReadOnlySegment<TKey, TValue>.Drop()
    IReadOnlySegment<TKey, TValue>.ReleaseResources()
    IReadOnlySegment<TKey, TValue>.GetIndexedReader()
    IReadOnlySegment<TKey, TValue>.GetSeekableIterator()
    IReadOnlySegment<TKey, TValue>.IsFullyFrozen
    IIndexedReader<TKey, TValue>.Length
    IIndexedReader<TKey, TValue>.GetKey(long)
    IIndexedReader<TKey, TValue>.GetValue(long)
    IIndexedReader<TKey, TValue>.GetKey(long, BlockPin)
    IIndexedReader<TKey, TValue>.GetValue(long, BlockPin)
    IIndexedReader<TKey, TValue>.GetLastSmallerOrEqualPosition(in TKey)
    IIndexedReader<TKey, TValue>.GetFirstGreaterOrEqualPosition(in TKey)
    IIndexedReader<TKey, TValue>.IsBeginningOfAPart(long)
    IIndexedReader<TKey, TValue>.IsEndOfAPart(long)
    IIndexedReader<TKey, TValue>.GetPartIndex(long)
    IDisposable.Dispose()
    Namespace: Tenray.ZoneTree.Segments
    Assembly: ZoneTree.dll
    Syntax
    public interface IDiskSegment<TKey, TValue> : IReadOnlySegment<TKey, TValue>, IIndexedReader<TKey, TValue>, IDisposable
    Type Parameters
    Name Description
    TKey
    TValue

    Properties

    | Improve this Doc View Source

    Length

    Gets number of the records in the segment.

    Declaration
    long Length { get; }
    Property Value
    Type Description
    long
    | Improve this Doc View Source

    ReadBufferCount

    Gets the count of read buffers.

    Declaration
    int ReadBufferCount { get; }
    Property Value
    Type Description
    int

    Methods

    | Improve this Doc View Source

    AttachIterator()

    Increments the iterator reader counter to ensure that disk segment stays alive until all iterators call DetachIterator.

    Declaration
    void AttachIterator()
    | Improve this Doc View Source

    DetachIterator()

    Decrements the iterator reader counter. When there is no attached iterator remaining and the drop is already requested, calls Drop().

    Declaration
    void DetachIterator()
    | Improve this Doc View Source

    Drop(HashSet<long>)

    Drops all sectors of the segment except those in the specified exclusion list.

    Declaration
    void Drop(HashSet<long> excludedPartIds)
    Parameters
    Type Name Description
    HashSet<long> excludedPartIds

    A set of part IDs to exclude from dropping.

    | Improve this Doc View Source

    GetFirstKeysOfEveryPart()

    Returns the first keys of every part.

    Declaration
    TKey[] GetFirstKeysOfEveryPart()
    Returns
    Type Description
    TKey[]

    An array of the first keys of each part.

    | Improve this Doc View Source

    GetLastKeysOfEveryPart()

    Returns the last keys of every part.

    Declaration
    TKey[] GetLastKeysOfEveryPart()
    Returns
    Type Description
    TKey[]

    An array of the last keys of each part.

    | Improve this Doc View Source

    GetLastValuesOfEveryPart()

    Returns the last values of every part.

    Declaration
    TValue[] GetLastValuesOfEveryPart()
    Returns
    Type Description
    TValue[]

    An array of the last values of each part.

    | Improve this Doc View Source

    GetPart(int)

    Retrieves the part of the segment at the specified index.

    Declaration
    IDiskSegment<TKey, TValue> GetPart(int partIndex)
    Parameters
    Type Name Description
    int partIndex

    The index of the part to retrieve.

    Returns
    Type Description
    IDiskSegment<TKey, TValue>

    The part of the segment at the specified index.

    | Improve this Doc View Source

    GetPartCount()

    Returns the total number of parts in the segment.

    Declaration
    int GetPartCount()
    Returns
    Type Description
    int

    The total number of parts.

    | Improve this Doc View Source

    InitSparseArray(int)

    Initializes the sparse array with the specified size.

    Declaration
    void InitSparseArray(int size)
    Parameters
    Type Name Description
    int size

    The size of the sparse array to initialize.

    | Improve this Doc View Source

    LoadIntoMemory()

    Initialize a sparse array alligned with segment length, enabling faster reads without I/O operations.

    Declaration
    void LoadIntoMemory()
    | Improve this Doc View Source

    ReleaseCircularKeyCacheRecords()

    Releases expired circular cache key records.

    Declaration
    int ReleaseCircularKeyCacheRecords()
    Returns
    Type Description
    int

    The total number of released cached records.

    | Improve this Doc View Source

    ReleaseCircularValueCacheRecords()

    Releases expired circular cache value records.

    Declaration
    int ReleaseCircularValueCacheRecords()
    Returns
    Type Description
    int

    The total number of released cached records.

    | Improve this Doc View Source

    ReleaseReadBuffers(long)

    Releases internal read buffers that have not been used since the specified tick count.

    Declaration
    int ReleaseReadBuffers(long ticks)
    Parameters
    Type Name Description
    long ticks
    Returns
    Type Description
    int

    The total number of released read buffers.

    | Improve this Doc View Source

    SetDefaultSparseArray(IReadOnlyList<SparseArrayEntry<TKey, TValue>>)

    Sets default sparse array of the disk segment and persists it to the disk.

    Declaration
    void SetDefaultSparseArray(IReadOnlyList<SparseArrayEntry<TKey, TValue>> defaultSparseArray)
    Parameters
    Type Name Description
    IReadOnlyList<SparseArrayEntry<TKey, TValue>> defaultSparseArray
    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © 2022 Tenray.io