Ejemplo n.º 1
0
            internal IHeapContainer <Key> DetachKey()
            {
                var tempKeyContainer = this.key;

                this.key = default; // transfer ownership
                return(tempKeyContainer);
            }
Ejemplo n.º 2
0
            internal IHeapContainer <Input> DetachInput()
            {
                var tempInputContainer = this.input;

                this.input = default; // transfer ownership
                return(tempInputContainer);
            }
Ejemplo n.º 3
0
 internal void Set(ref FasterKV <TKey, TValue> .PendingContext <TInput, TOutput, TContext> pendingContext, Status status)
 {
     this.keyContainer   = pendingContext.key;
     this.inputContainer = pendingContext.input;
     this.Output         = pendingContext.output;
     this.Context        = pendingContext.userContext;
     this.RecordMetadata = new(pendingContext.recordInfo, pendingContext.logicalAddress);
     this.Status         = status;
 }
Ejemplo n.º 4
0
 internal void Set(ref FasterKV <TKey, TValue> .PendingContext <TInput, TOutput, TContext> pendingContext)
 {
     this.keyContainer   = pendingContext.key;
     this.inputContainer = pendingContext.input;
     this.Output         = pendingContext.output;
     this.Context        = pendingContext.userContext;
     this.RecordInfo     = pendingContext.recordInfo;
     this.Address        = pendingContext.logicalAddress;
 }
Ejemplo n.º 5
0
        internal void Dispose()
        {
            var tempKeyContainer = keyContainer;

            keyContainer = default;
            tempKeyContainer?.Dispose();

            var tempInputContainer = inputContainer;

            inputContainer = default;
            tempInputContainer?.Dispose();

            Output  = default;
            Context = default;
        }
Ejemplo n.º 6
0
 public int GetHashCode(IHeapContainer <TKey> k) => (int)comparer.GetHashCode64(ref k.Get());
Ejemplo n.º 7
0
 public bool Equals(IHeapContainer <TKey> k1, IHeapContainer <TKey> k2) => comparer.Equals(ref k1.Get(), ref k2.Get());
Ejemplo n.º 8
0
        internal RecordInfo lockRecordInfo; // in lock table; we have to Lock/Tentative the LockTable entry separately from logRecordInfo

        internal LockTableEntry(IHeapContainer <TKey> key, RecordInfo logRecordInfo, RecordInfo lockRecordInfo)
        {
            this.key            = key;
            this.logRecordInfo  = logRecordInfo;
            this.lockRecordInfo = lockRecordInfo;
        }
Ejemplo n.º 9
0
        internal void Dispose()
        {
            var tempKeyContainer = keyContainer;

            keyContainer = default;
            if (tempKeyContainer is { })