Page Speed Optimization Libraries  1.8.31.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Types | Public Member Functions
net_instaweb::PropertyStore Class Reference

#include "property_store.h"

Inheritance diagram for net_instaweb::PropertyStore:
net_instaweb::CachePropertyStore net_instaweb::TwoLevelPropertyStore

List of all members.

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

Detailed Description

Abstract interface for implementing PropertyStore which helps to retrieve and put properties into the storage system.


Member Function Documentation

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.

virtual void net_instaweb::PropertyStore::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 
) [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.

virtual GoogleString net_instaweb::PropertyStore::Name ( ) const [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 net/instaweb/system/system_caches_test.cc.

Implemented in net_instaweb::CachePropertyStore, and net_instaweb::TwoLevelPropertyStore.

virtual void net_instaweb::PropertyStore::Put ( const GoogleString &  url,
const GoogleString &  options_signature_hash,
const GoogleString &  cache_key_suffix,
const PropertyCache::Cohort cohort,
const PropertyCacheValues *  values,
BoolCallback *  done 
) [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.

Todo:
TODO(pulkitg): Remove UserAgentMatcher dependency.

Implemented in net_instaweb::CachePropertyStore, and net_instaweb::TwoLevelPropertyStore.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines