Search Results for

    Show / Hide Table of Contents

    Class DiskSegment<TKey, TValue>

    Inheritance
    object
    DiskSegment<TKey, TValue>
    FixedSizeKeyAndValueDiskSegment<TKey, TValue>
    FixedSizeKeyDiskSegment<TKey, TValue>
    FixedSizeValueDiskSegment<TKey, TValue>
    VariableSizeDiskSegment<TKey, TValue>
    Implements
    IDiskSegment<TKey, TValue>
    IReadOnlySegment<TKey, TValue>
    IIndexedReader<TKey, TValue>
    IDisposable
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Tenray.ZoneTree.Segments.Disk
    Assembly: ZoneTree.dll
    Syntax
    public abstract class DiskSegment<TKey, TValue> : IDiskSegment<TKey, TValue>, IReadOnlySegment<TKey, TValue>, IIndexedReader<TKey, TValue>, IDisposable
    Type Parameters
    Name Description
    TKey
    TValue

    Constructors

    | Improve this Doc View Source

    DiskSegment(long, ZoneTreeOptions<TKey, TValue>)

    Declaration
    protected DiskSegment(long segmentId, ZoneTreeOptions<TKey, TValue> options)
    Parameters
    Type Name Description
    long segmentId
    ZoneTreeOptions<TKey, TValue> options
    | Improve this Doc View Source

    DiskSegment(long, ZoneTreeOptions<TKey, TValue>, IRandomAccessDevice)

    Declaration
    protected DiskSegment(long segmentId, ZoneTreeOptions<TKey, TValue> options, IRandomAccessDevice dataDevice)
    Parameters
    Type Name Description
    long segmentId
    ZoneTreeOptions<TKey, TValue> options
    IRandomAccessDevice dataDevice

    Fields

    | Improve this Doc View Source

    DataDevice

    Declaration
    protected IRandomAccessDevice DataDevice
    Field Value
    Type Description
    IRandomAccessDevice
    | Improve this Doc View Source

    IsDroppping

    Declaration
    protected volatile bool IsDroppping
    Field Value
    Type Description
    bool
    | Improve this Doc View Source

    KeySerializer

    Declaration
    protected readonly ISerializer<TKey> KeySerializer
    Field Value
    Type Description
    ISerializer<TKey>
    | Improve this Doc View Source

    KeySize

    Declaration
    protected int KeySize
    Field Value
    Type Description
    int
    | Improve this Doc View Source

    Options

    Declaration
    protected ZoneTreeOptions<TKey, TValue> Options
    Field Value
    Type Description
    ZoneTreeOptions<TKey, TValue>
    | Improve this Doc View Source

    ReadCount

    Declaration
    protected volatile int ReadCount
    Field Value
    Type Description
    int
    | Improve this Doc View Source

    SparseArray

    Declaration
    protected IReadOnlyList<SparseArrayEntry<TKey, TValue>> SparseArray
    Field Value
    Type Description
    IReadOnlyList<SparseArrayEntry<TKey, TValue>>
    | Improve this Doc View Source

    ValueSerializer

    Declaration
    protected readonly ISerializer<TValue> ValueSerializer
    Field Value
    Type Description
    ISerializer<TValue>
    | Improve this Doc View Source

    ValueSize

    Declaration
    protected int ValueSize
    Field Value
    Type Description
    int

    Properties

    | Improve this Doc View Source

    CircularKeyCache

    Declaration
    public CircularCache<TKey> CircularKeyCache { get; }
    Property Value
    Type Description
    CircularCache<TKey>
    | Improve this Doc View Source

    CircularValueCache

    Declaration
    public CircularCache<TValue> CircularValueCache { get; }
    Property Value
    Type Description
    CircularCache<TValue>
    | Improve this Doc View Source

    DropFailureReporter

    Exceptions occurs in delayed drops (eg: iterators delays segment drops) are being reported to the IZoneTreeMaintenance interface events through this delegate. This is for internal usage.

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

    IsFullyFrozen

    This flag indicates that the readonly segment has completed all writes and is guaranteed to be frozen.

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

    IsIterativeIndexReader

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

    Length

    Gets number of the records in the segment.

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

    MaximumOpIndex

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

    ReadBufferCount

    Gets the count of read buffers.

    Declaration
    public abstract int ReadBufferCount { get; }
    Property Value
    Type Description
    int
    | Improve this Doc View Source

    SegmentId

    Declaration
    public long SegmentId { get; }
    Property Value
    Type Description
    long

    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
    public void AttachIterator()
    | Improve this Doc View Source

    ContainsKey(in TKey)

    Declaration
    public bool ContainsKey(in TKey key)
    Parameters
    Type Name Description
    TKey key
    Returns
    Type Description
    bool
    | Improve this Doc View Source

    DeleteDevices()

    Declaration
    protected abstract void DeleteDevices()
    | 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
    public void DetachIterator()
    | 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

    Dispose(bool)

    Declaration
    protected virtual void Dispose(bool disposing)
    Parameters
    Type Name Description
    bool disposing
    | Improve this Doc View Source

    Drop()

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

    Drop(HashSet<long>)

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

    Declaration
    public 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

    GetFirstGreaterOrEqualPosition(in TKey)

    Declaration
    public long GetFirstGreaterOrEqualPosition(in TKey key)
    Parameters
    Type Name Description
    TKey key
    Returns
    Type Description
    long
    | Improve this Doc View Source

    GetFirstKeysOfEveryPart()

    Returns the first keys of every part.

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

    An array of the first keys of each part.

    | Improve this Doc View Source

    GetIndexedReader()

    Declaration
    public IIndexedReader<TKey, TValue> GetIndexedReader()
    Returns
    Type Description
    IIndexedReader<TKey, TValue>
    | Improve this Doc View Source

    GetKey(long)

    Declaration
    public TKey GetKey(long index)
    Parameters
    Type Name Description
    long index
    Returns
    Type Description
    TKey
    | Improve this Doc View Source

    GetKey(long, BlockPin)

    Declaration
    public TKey GetKey(long index, BlockPin pin)
    Parameters
    Type Name Description
    long index
    BlockPin pin
    Returns
    Type Description
    TKey
    | Improve this Doc View Source

    GetLastKeysOfEveryPart()

    Returns the last keys of every part.

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

    An array of the last keys of each part.

    | Improve this Doc View Source

    GetLastSmallerOrEqualPosition(in TKey)

    Declaration
    public long GetLastSmallerOrEqualPosition(in TKey key)
    Parameters
    Type Name Description
    TKey key
    Returns
    Type Description
    long
    | Improve this Doc View Source

    GetLastValuesOfEveryPart()

    Returns the last values of every part.

    Declaration
    public 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
    public 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
    public int GetPartCount()
    Returns
    Type Description
    int

    The total number of parts.

    | Improve this Doc View Source

    GetPartIndex(long)

    Declaration
    public int GetPartIndex(long index)
    Parameters
    Type Name Description
    long index
    Returns
    Type Description
    int
    | Improve this Doc View Source

    GetSeekableIterator()

    Declaration
    public ISeekableIterator<TKey, TValue> GetSeekableIterator()
    Returns
    Type Description
    ISeekableIterator<TKey, TValue>
    | Improve this Doc View Source

    GetValue(long)

    Declaration
    public TValue GetValue(long index)
    Parameters
    Type Name Description
    long index
    Returns
    Type Description
    TValue
    | Improve this Doc View Source

    GetValue(long, BlockPin)

    Declaration
    public TValue GetValue(long index, BlockPin pin)
    Parameters
    Type Name Description
    long index
    BlockPin pin
    Returns
    Type Description
    TValue
    | Improve this Doc View Source

    InitSparseArray(int)

    Initializes the sparse array with the specified size.

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

    The size of the sparse array to initialize.

    | Improve this Doc View Source

    IsBeginningOfAPart(long)

    Declaration
    public bool IsBeginningOfAPart(long index)
    Parameters
    Type Name Description
    long index
    Returns
    Type Description
    bool
    | Improve this Doc View Source

    IsEndOfAPart(long)

    Declaration
    public bool IsEndOfAPart(long index)
    Parameters
    Type Name Description
    long index
    Returns
    Type Description
    bool
    | Improve this Doc View Source

    LoadIntoMemory()

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

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

    ReadKey(long)

    Declaration
    protected TKey ReadKey(long index)
    Parameters
    Type Name Description
    long index
    Returns
    Type Description
    TKey
    | Improve this Doc View Source

    ReadKey(long, BlockPin)

    Declaration
    protected abstract TKey ReadKey(long index, BlockPin pin)
    Parameters
    Type Name Description
    long index
    BlockPin pin
    Returns
    Type Description
    TKey
    | Improve this Doc View Source

    ReadValue(long)

    Declaration
    protected TValue ReadValue(long index)
    Parameters
    Type Name Description
    long index
    Returns
    Type Description
    TValue
    | Improve this Doc View Source

    ReadValue(long, BlockPin)

    Declaration
    protected abstract TValue ReadValue(long index, BlockPin pin)
    Parameters
    Type Name Description
    long index
    BlockPin pin
    Returns
    Type Description
    TValue
    | Improve this Doc View Source

    ReleaseCircularKeyCacheRecords()

    Releases expired circular cache key records.

    Declaration
    public 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
    public 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
    public abstract 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

    ReleaseResources()

    Declaration
    public virtual void ReleaseResources()
    | 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
    public abstract void SetDefaultSparseArray(IReadOnlyList<SparseArrayEntry<TKey, TValue>> defaultSparseArray)
    Parameters
    Type Name Description
    IReadOnlyList<SparseArrayEntry<TKey, TValue>> defaultSparseArray
    | Improve this Doc View Source

    TryGet(in TKey, out TValue)

    Declaration
    public bool TryGet(in TKey key, out TValue value)
    Parameters
    Type Name Description
    TKey key
    TValue value
    Returns
    Type Description
    bool

    Implements

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