CollectionRef c = get_collection(cid);
if (!c)
return false;
- RWLock::RLocker l(c->lock);
// Perform equivalent of c->get_object_(oid) != NULL. In C++11 the
// shared_ptr needs to be compared to nullptr.
CollectionRef c = get_collection(cid);
if (!c)
return -ENOENT;
- RWLock::RLocker l(c->lock);
ObjectRef o = c->get_object(oid);
if (!o)
CollectionRef c = get_collection(cid);
if (!c)
return -ENOENT;
- RWLock::RLocker lc(c->lock);
ObjectRef o = c->get_object(oid);
if (!o)
CollectionRef c = get_collection(cid);
if (!c)
return -ENOENT;
- RWLock::RLocker lc(c->lock);
ObjectRef o = c->get_object(oid);
if (!o)
CollectionRef c = get_collection(cid);
if (!c)
return -ENOENT;
- RWLock::RLocker l(c->lock);
ObjectRef o = c->get_object(oid);
if (!o)
CollectionRef c = get_collection(cid);
if (!c)
return -ENOENT;
- RWLock::RLocker l(c->lock);
ObjectRef o = c->get_object(oid);
if (!o)
CollectionRef c = get_collection(cid);
if (!c)
return -ENOENT;
- RWLock::RLocker l(c->lock);
ObjectRef o = c->get_object(oid);
if (!o)
CollectionRef c = get_collection(cid);
if (!c)
return -ENOENT;
- RWLock::RLocker l(c->lock);
ObjectRef o = c->get_object(oid);
if (!o)
CollectionRef c = get_collection(cid);
if (!c)
return -ENOENT;
- RWLock::RLocker l(c->lock);
ObjectRef o = c->get_object(oid);
if (!o)
CollectionRef c = get_collection(cid);
if (!c)
return -ENOENT;
- RWLock::RLocker l(c->lock);
ObjectRef o = c->get_object(oid);
if (!o)
CollectionRef c = get_collection(cid);
if (!c)
return -ENOENT;
- RWLock::RLocker l(c->lock);
ObjectRef o = c->get_object(oid);
if (!o)
CollectionRef c = get_collection(cid);
if (!c)
return ObjectMap::ObjectMapIterator();
- RWLock::RLocker l(c->lock);
ObjectRef o = c->get_object(oid);
if (!o)
CollectionRef c = get_collection(cid);
if (!c)
return -ENOENT;
- RWLock::WLocker l(c->lock);
ObjectRef o = c->get_object(oid);
if (!o) {
CollectionRef c = get_collection(cid);
if (!c)
return -ENOENT;
- RWLock::WLocker l(c->lock);
ObjectRef o = c->get_object(oid);
if (!o) {
CollectionRef c = get_collection(cid);
if (!c)
return -ENOENT;
- RWLock::WLocker l(c->lock);
ObjectRef o = c->get_object(oid);
if (!o)
return -ENOENT;
RWLock::WLocker l(c->lock);
- ObjectRef o = c->get_object(oid);
- if (!o)
+ auto i = c->object_hash.find(oid);
+ if (i == c->object_hash.end())
return -ENOENT;
+ c->object_hash.erase(i);
c->object_map.erase(oid);
- c->object_hash.erase(oid);
-
- used_bytes -= o->get_size();
+ used_bytes -= i->second->get_size();
return 0;
}
CollectionRef c = get_collection(cid);
if (!c)
return -ENOENT;
- RWLock::WLocker l(c->lock);
ObjectRef o = c->get_object(oid);
if (!o)
CollectionRef c = get_collection(cid);
if (!c)
return -ENOENT;
- RWLock::WLocker l(c->lock);
ObjectRef o = c->get_object(oid);
if (!o)
CollectionRef c = get_collection(cid);
if (!c)
return -ENOENT;
- RWLock::WLocker l(c->lock);
ObjectRef o = c->get_object(oid);
if (!o)
CollectionRef c = get_collection(cid);
if (!c)
return -ENOENT;
- RWLock::WLocker l(c->lock);
ObjectRef oo = c->get_object(oldoid);
if (!oo)
CollectionRef c = get_collection(cid);
if (!c)
return -ENOENT;
- RWLock::WLocker l(c->lock);
ObjectRef oo = c->get_object(oldoid);
if (!oo)
CollectionRef c = get_collection(cid);
if (!c)
return -ENOENT;
- RWLock::WLocker l(c->lock);
ObjectRef o = c->get_object(oid);
if (!o)
CollectionRef c = get_collection(cid);
if (!c)
return -ENOENT;
- RWLock::WLocker l(c->lock);
ObjectRef o = c->get_object(oid);
if (!o)
CollectionRef c = get_collection(cid);
if (!c)
return -ENOENT;
- RWLock::WLocker l(c->lock);
ObjectRef o = c->get_object(oid);
if (!o)
CollectionRef c = get_collection(cid);
if (!c)
return -ENOENT;
- RWLock::WLocker l(c->lock);
ObjectRef o = c->get_object(oid);
if (!o)
CollectionRef c = get_collection(cid);
if (!c)
return -ENOENT;
- RWLock::WLocker l(c->lock);
ObjectRef o = c->get_object(oid);
if (!o)