mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Factor upTime() out of KeyCache, fix warnings
This commit is contained in:
@@ -9,9 +9,21 @@
|
||||
#include "uint256.h"
|
||||
#include "ScopedLock.h"
|
||||
#include "TaggedCache.h"
|
||||
#include "KeyCache.h"
|
||||
#include "InstanceCounter.h"
|
||||
|
||||
|
||||
// VFALCO: TODO, Move this to someplace sensible!!
|
||||
// Adapter to furnish uptime information to KeyCache via UptimeTimer singleton
|
||||
struct KeyCacheUptimeTimer
|
||||
{
|
||||
inline static int getElapsedSeconds ()
|
||||
{
|
||||
return UptimeTimer::getInstance().getElapsedSeconds ();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
DEFINE_INSTANCE(HashedObject);
|
||||
|
||||
class Job;
|
||||
@@ -51,7 +63,7 @@ class HashedObjectStore
|
||||
{
|
||||
protected:
|
||||
TaggedCache<uint256, HashedObject> mCache;
|
||||
KeyCache<uint256> mNegativeCache;
|
||||
KeyCache <uint256, KeyCacheUptimeTimer> mNegativeCache;
|
||||
|
||||
boost::mutex mWriteMutex;
|
||||
boost::condition_variable mWriteCondition;
|
||||
|
||||
Reference in New Issue
Block a user