Search Results for

    Show / Hide Table of Contents

    Class ZoneTreeMaintainer<TKey, TValue>

    The maintainer for ZoneTree to control merge operations and memory compaction.

    Inheritance
    object
    ZoneTreeMaintainer<TKey, TValue>
    Implements
    IMaintainer
    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 ZoneTreeMaintainer<TKey, TValue> : IMaintainer, IDisposable
    Type Parameters
    Name Description
    TKey

    The key type

    TValue

    The value type

    Remarks

    You must complete or cancel all pending tasks of this maintainer before disposing.

    Constructors

    | Improve this Doc View Source

    ZoneTreeMaintainer(ITransactionalZoneTree<TKey, TValue>, ILogger)

    Creates a ZoneTreeMaintainer.

    Declaration
    public ZoneTreeMaintainer(ITransactionalZoneTree<TKey, TValue> zoneTree, ILogger logger = null)
    Parameters
    Type Name Description
    ITransactionalZoneTree<TKey, TValue> zoneTree

    The transactional ZoneTree

    ILogger logger

    The logger

    | Improve this Doc View Source

    ZoneTreeMaintainer(IZoneTree<TKey, TValue>, bool, ILogger)

    Creates a ZoneTreeMaintainer.

    Declaration
    public ZoneTreeMaintainer(IZoneTree<TKey, TValue> zoneTree, bool startJobForCleaningInactiveBlockCaches = true, ILogger logger = null)
    Parameters
    Type Name Description
    IZoneTree<TKey, TValue> zoneTree

    The ZoneTree

    bool startJobForCleaningInactiveBlockCaches

    Starts periodic timer if true.

    ILogger logger

    The logger

    Properties

    | Improve this Doc View Source

    DiskSegmentBufferLifeTime

    Sets or gets Disk Segment block cache life time in milliseconds. Default value is 10_000 milliseconds.

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

    EnableJobForCleaningInactiveCaches

    Gets or sets a value indicating whether a periodic timer is enabled to release unused block and key/value record caches in the disk segment. Changing this property will start or stop the periodic timer accordingly. The default value is false.

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

    InactiveBlockCacheCleanupInterval

    Gets or sets the interval for the periodic timer that triggers the cleanup job. The default value is 5 seconds.

    Declaration
    public TimeSpan InactiveBlockCacheCleanupInterval { get; set; }
    Property Value
    Type Description
    TimeSpan
    | Improve this Doc View Source

    Maintenance

    The associated ZoneTree maintenance instance.

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

    MaximumReadOnlySegmentCount

    Starts merge operation when read-only segments count exceeds this value. Default value is 64.

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

    MinimumSparseArrayLength

    Minimum sparse array length when a new disk segment is created. Default value is 0.

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

    SparseArrayStepLength

    Configures sparse array step length when the disk segment length is bigger than MinimumSparseArrayLength * SparseArrayStepLength. The default value is 1000. The sparse array length reduce binary lookup range on disk segment to reduce IO.

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

    ThresholdForMergeOperationStart

    Starts merge operation when records count in read-only segments exceeds this value. Default value is 0.

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

    ZoneTree

    The associated ZoneTree instance.

    Declaration
    public IZoneTree<TKey, TValue> ZoneTree { get; }
    Property Value
    Type Description
    IZoneTree<TKey, TValue>

    Methods

    | Improve this Doc View Source

    WaitForBackgroundThreads()

    Waits until all running tasks are completed.

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

    Dispose()

    Disposes this maintainer.

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

    TryCancelBackgroundThreads()

    Tries cancel running tasks.

    Declaration
    public void TryCancelBackgroundThreads()

    Implements

    IMaintainer
    IDisposable
    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © 2022 Tenray.io