Search Results for

    Show / Hide Table of Contents

    Class OptimisticTransaction<TKey, TValue>

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

    Constructors

    | Improve this Doc View Source

    OptimisticTransaction(long, ZoneTreeOptions<TKey, TValue>, ITransactionLog<TKey, TValue>)

    Declaration
    public OptimisticTransaction(long transactionId, ZoneTreeOptions<TKey, TValue> options, ITransactionLog<TKey, TValue> transactionLog)
    Parameters
    Type Name Description
    long transactionId
    ZoneTreeOptions<TKey, TValue> options
    ITransactionLog<TKey, TValue> transactionLog

    Properties

    | Improve this Doc View Source

    IsReadyToCommit

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

    TransactionId

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

    Methods

    | Improve this Doc View Source

    HandleReadKey(ref ReadWriteStamp)

    Marks read stamp, adds dependencies or aborts transaction. https://en.wikipedia.org/wiki/Timestamp-based_concurrency_control

    Declaration
    public OptimisticReadAction HandleReadKey(ref ReadWriteStamp readWriteStamp)
    Parameters
    Type Name Description
    ReadWriteStamp readWriteStamp
    Returns
    Type Description
    OptimisticReadAction

    Optimistic read action.

    | Improve this Doc View Source

    HandleWriteKey(ref ReadWriteStamp, in TKey, bool, in TValue)

    Marks write stamp, adds old values or aborts transaction. Returns SkipWrite for skipping writes. (Thomas Write Rule) https://en.wikipedia.org/wiki/Thomas_Write_Rule

    Declaration
    public OptimisticWriteAction HandleWriteKey(ref ReadWriteStamp readWriteStamp, in TKey key, bool hasOldValue, in TValue oldValue)
    Parameters
    Type Name Description
    ReadWriteStamp readWriteStamp
    TKey key
    bool hasOldValue
    TValue oldValue
    Returns
    Type Description
    OptimisticWriteAction

    Optimistic write action

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