bool Tree::del(Slice key) { assert(root_); InnerNode *root = root_; root->inc_ref(); bool ret = root->del(key); root->dec_ref(); return ret; }
void Tree::lock_path(Slice key, std::vector<DataNode*>& path) { assert(root_); InnerNode *root = root_; root->inc_ref(); root->write_lock(); path.push_back(root); root->lock_path(key, path); }
bool Tree::put(Slice key, Slice value) { assert(root_); InnerNode *root = root_; root->inc_ref(); bool ret = root->put(key, value); root->dec_ref(); return ret; }
bool Tree::get(Slice key, Slice& value) { assert(root_); InnerNode *root = root_; root->inc_ref(); bool ret = root->find(key, value, NULL); root->dec_ref(); return ret; }