예제 #1
0
  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);
  }
예제 #2
0
  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);
  }
예제 #3
0
  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;
  }
예제 #4
0
  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;
  }
예제 #5
0
  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;
  }