bool Database::GetNodesByOffset(const std::list<FileOffset>& offsets, std::vector<NodeRef>& nodes) const { NodeDataFileRef nodeDataFile=GetNodeDataFile(); if (nodeDataFile.Invalid()) { return false; } return nodeDataFile->GetByOffset(offsets,nodes); }
bool Database::GetNodesByOffset(const std::set<FileOffset>& offsets, std::unordered_map<FileOffset,NodeRef>& dataMap) const { NodeDataFileRef nodeDataFile=GetNodeDataFile(); if (nodeDataFile.Invalid()) { return false; } return nodeDataFile->GetByOffset(offsets,dataMap); }
bool Database::GetNodeByOffset(const FileOffset& offset, NodeRef& node) const { NodeDataFileRef nodeDataFile=GetNodeDataFile(); if (nodeDataFile.Invalid()) { return false; } if (nodeDataFile->GetByOffset(offset,node)) { return true; } return false; }
bool Database::GetNodesByOffset(const std::set<FileOffset>& offsets, std::unordered_map<FileOffset,NodeRef>& dataMap) const { NodeDataFileRef nodeDataFile=GetNodeDataFile(); if (!nodeDataFile) { return false; } StopClock time; bool result=nodeDataFile->GetByOffset(offsets,dataMap); time.Stop(); if (time.GetMilliseconds()>100) { log.Warn() << "Retrieving nodes by offset took " << time.ResultString(); } return result; }
bool Database::GetNodeByOffset(const FileOffset& offset, NodeRef& node) const { NodeDataFileRef nodeDataFile=GetNodeDataFile(); if (!nodeDataFile) { return false; } StopClock time; bool result=nodeDataFile->GetByOffset(offset,node); time.Stop(); if (time.GetMilliseconds()>100) { log.Warn() << "Retrieving nodes by offset took " << time.ResultString(); } return result; }