本文整理汇总了C++中ObjectId::str方法的典型用法代码示例。如果您正苦于以下问题:C++ ObjectId::str方法的具体用法?C++ ObjectId::str怎么用?C++ ObjectId::str使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ObjectId
的用法示例。
在下文中一共展示了ObjectId::str方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: from_path
DirectoryEntryPtr
MetaDataStore::rename(const ObjectId& from_parent,
const std::string& from,
const ObjectId& to_parent,
const std::string& to)
{
LOG_TRACE(from << " -> " << to);
FrontendPath from_path(find_path(from_parent));
from_path /= from;
FrontendPath to_path(find_path(to_parent));
to_path /= to;
boost::optional<DirectoryEntryPtr>
maybe_overwritten(harakoon_.rename<DirectoryEntry>(yt::UUID(from_parent.str()),
from,
yt::UUID(to_parent.str()),
to));
drop_from_cache(from_path);
DirectoryEntryPtr dentry;
if (maybe_overwritten)
{
drop_from_cache(to_path);
dentry = *maybe_overwritten;
}
return dentry;
}
示例2: FileExistsException
void
MetaDataStore::add(const ObjectId& parent,
const std::string& name,
DirectoryEntryPtr dentry)
{
LOG_TRACE(parent << ", dentry uuid " << dentry->object_id() << " name " << name);
const yt::UUID p(parent.str());
const boost::optional<DirectoryEntry> oldval;
try
{
harakoon_.test_and_set(p,
name,
*dentry,
oldval);
}
catch (HierarchicalArakoon::PreconditionFailedException)
{
throw FileExistsException("Metadata entry already exists",
name.c_str(),
EEXIST);
}
FrontendPath path(find_path(parent));
path /= name;
maybe_add_to_cache_(path, dentry);
}
示例3:
events::Event
FileSystemEvents::owner_changed(const ObjectId& oid,
const NodeId& new_owner_id)
{
events::Event ev;
auto msg = ev.MutableExtension(events::owner_changed);
msg->set_name(oid.str());
msg->set_new_owner_id(new_owner_id.str());
return ev;
}
示例4: path
void
MetaDataStore::unlink(const ObjectId& id,
const std::string& name)
{
LOG_TRACE(id);
FrontendPath path(find_path(id));
path /= name;
harakoon_.erase(yt::UUID(id.str()), name);
drop_from_cache(path);
}
示例5: FrontendPath
FrontendPath
MetaDataStore::find_path(const ObjectId& id)
{
return FrontendPath(harakoon_.get_path_by_id(yt::UUID(id.str())).str());
}