Page Speed Optimization Libraries
1.13.35.1
|
#include "property_store.h"
Public Types | |
typedef Callback1< bool > | BoolCallback |
Public Member Functions | |
virtual void | Get (const GoogleString &url, const GoogleString &options_signature_hash, const GoogleString &cache_key_suffix, const PropertyCache::CohortVector &cohort_list, PropertyPage *page, BoolCallback *done, AbstractPropertyStoreGetCallback **callback)=0 |
virtual void | Put (const GoogleString &url, const GoogleString &options_signature_hash, const GoogleString &cache_key_suffix, const PropertyCache::Cohort *cohort, const PropertyCacheValues *values, BoolCallback *done)=0 |
bool | enable_get_cancellation () |
void | set_enable_get_cancellation (bool x) |
virtual GoogleString | Name () const =0 |
Abstract interface for implementing PropertyStore which helps to retrieve and put properties into the storage system.
|
inline |
PropertyStore::Get can be cancelled if enable_get_cancellation is true i.e. input done callback will be called as soon as FastFinishLookup() is called on the AbstractPropertyStoreGetCallback callback.
|
pure virtual |
Populates the values field for all the cohorts present in the cohort_list and call the BoolCallback after lookup of all the cohorts are done. BoolCallback is called with true if at least one of the cohorts lookup is succeeded. PropertyPage object is used to validate the entries looked up from cache. AbstractPropertyStoreGetCallback is set in callback parameter and can be used to fast finish the lookup. Client must call DeleteWhenDone() on this callback after that it is no more usable. This parameter can be set to NULL.
Implemented in net_instaweb::CachePropertyStore, and net_instaweb::TwoLevelPropertyStore.
|
pure virtual |
The name of this PropertyStore – used for logging and debugging.
It is strongly recommended that you provide a static GoogleString FormatName(...) method for use in formatting the Name() return, and in testing, e.g. in third_party/pagespeed/system/system_caches_test.cc.
Implemented in net_instaweb::CachePropertyStore, and net_instaweb::TwoLevelPropertyStore.
|
pure virtual |
Write to storage system for the given key. Callback done can be NULL. BoolCallback done will be called with true if Insert operation is successful.
Implemented in net_instaweb::CachePropertyStore, and net_instaweb::TwoLevelPropertyStore.