internal IHeapContainer <Key> DetachKey() { var tempKeyContainer = this.key; this.key = default; // transfer ownership return(tempKeyContainer); }
internal IHeapContainer <Input> DetachInput() { var tempInputContainer = this.input; this.input = default; // transfer ownership return(tempInputContainer); }
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; }
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; }
internal void Dispose() { var tempKeyContainer = keyContainer; keyContainer = default; tempKeyContainer?.Dispose(); var tempInputContainer = inputContainer; inputContainer = default; tempInputContainer?.Dispose(); Output = default; Context = default; }
public int GetHashCode(IHeapContainer <TKey> k) => (int)comparer.GetHashCode64(ref k.Get());
public bool Equals(IHeapContainer <TKey> k1, IHeapContainer <TKey> k2) => comparer.Equals(ref k1.Get(), ref k2.Get());
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; }
internal void Dispose() { var tempKeyContainer = keyContainer; keyContainer = default; if (tempKeyContainer is { })