Adding getNumberOfBranches method to sync logic
This commit is contained in:
1 parent
1a0d774223
commit
802373866d
2 files changed
+11
-1
No files matched your search
@@ -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;
|
||||
|
||||
@@ -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 ();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user