Adding getNumberOfBranches method to sync logic

This commit is contained in:
Alexander Afanasyev committed 2012-10-04 10:20:47 -07:00
1 parent 1a0d774223
commit 802373866d
2 files changed
+11 -1

No files matched your search

+4 -1
View File
@@ -157,11 +157,14 @@ private:
void
sendSyncData (const std::string &name,
DigestConstPtr digest, StateConstPtr state);
size_t
getNumberOfBranches () const;
private:
FullStatePtr m_state;
DiffStateContainer m_log;
boost::recursive_mutex m_stateMutex;
mutable boost::recursive_mutex m_stateMutex;
std::string m_outstandingInterestName;
SyncInterestTable m_syncInterestTable;
+7
View File
@@ -577,5 +577,12 @@ SyncLogic::getRootDigest()
return os.str();
}
size_t
SyncLogic::getNumberOfBranches () const
{
recursive_mutex::scoped_lock lock (m_stateMutex);
return m_state->getLeaves ().size ();
}
}