void FakeBlockStore::remove(unique_ref<Block> block) { Key key = block->key(); cpputils::destruct(std::move(block)); std::unique_lock<std::mutex> lock(_mutex); int numRemoved = _blocks.erase(key); ASSERT(numRemoved == 1, "Block not found"); }
void OnDiskBlockStore::remove(unique_ref<Block> block) { Key key = block->key(); cpputils::destruct(std::move(block)); OnDiskBlock::RemoveFromDisk(_rootdir, key); }
void InMemoryBlockStore::remove(unique_ref<Block> block) { Key key = block->key(); cpputils::destruct(std::move(block)); int numRemoved = _blocks.erase(key.ToString()); ASSERT(1==numRemoved, "Didn't find block to remove"); }
void CachingBlockStore::release(unique_ref<Block> block) { Key key = block->key(); _cache.push(key, std::move(block)); }
void ParallelAccessDataTreeStore::remove(unique_ref<DataTreeRef> tree) { Key key = tree->key(); return _parallelAccessStore.remove(key, std::move(tree)); }
void ParallelAccessFsBlobStore::remove(unique_ref<FsBlobRef> blob) { Key key = blob->key(); return _parallelAccessStore.remove(key, std::move(blob)); }