Page Speed Optimization Libraries
1.6.29.3
|
#include "cache_test_base.h"
Public Member Functions | |
Callback (CacheTestBase *test) | |
Callback * | Reset () |
virtual bool | ValidateCandidate (const GoogleString &key, CacheInterface::KeyState state) |
virtual void | Done (CacheInterface::KeyState state) |
virtual void | Wait () |
void | set_invalid_value (const char *v) |
StringPiece | value_str () |
Public Attributes | |
bool | validate_called_ |
bool | noop_wait_called_ |
bool | value_of_called_when_wait_was_invoked_ |
Helper class for calling Get on cache implementations that are blocking in nature (e.g. in-memory LRU or blocking file-system). Also tests the CacheInterface::SynchronousCallback class in the process.
virtual void net_instaweb::CacheTestBase::Callback::Wait | ( | ) | [inline, virtual] |
The default implementation has an empty Wait implementation. If you override this, be sure also to call set_mutex() from the test subclass constructor or SetUp to protect outstanding_fetches_.