Add 'getTrackSize'

This commit is contained in:
JoelKatz
2012-10-31 15:55:14 -07:00
parent f0eb8e7943
commit 9743b7cafa

View File

@@ -44,6 +44,7 @@ public:
int getTargetAge() const;
int getCacheSize();
int getTrackSize();
int getSweepAge();
void setTargetSize(int size);
@@ -78,6 +79,12 @@ template<typename c_Key, typename c_Data> int TaggedCache<c_Key, c_Data>::getCac
return mCache.size();
}
template<typename c_Key, typename c_Data> int TaggedCache<c_Key, c_Data>::getTrackSize()
{
boost::recursive_mutex::scoped_lock sl(mLock);
return mMap.size();
}
template<typename c_Key, typename c_Data> void TaggedCache<c_Key, c_Data>::sweep()
{
boost::recursive_mutex::scoped_lock sl(mLock);