public NodePin Create(LockType ltype, bool isLeaf) { IStorageHandle storeHandle = _cache.Storage.Create(); NodeHandle handle = new NodeHandle(storeHandle); object refobj; ILockStrategy lck = _cache.CreateLock(handle, out refobj); int size = isLeaf ? _cache.Options.MaximumValueNodes : _cache.Options.MaximumChildNodes; NodePin pin = new NodePin(handle, lck, ltype, LockType.Insert, refobj, null, new Node(handle.StoreHandle, size)); NodePin.Append(ref _created, pin); return(pin); }
public void Destroy(NodePin pin) { Assert(pin.LockType != LockType.Read, "Node is not locked for update"); NodePin.Append(ref _deleted, pin); pin.MarkDeleted(); }