Page Speed Optimization Libraries  1.13.35.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
two_level_property_store.h
Go to the documentation of this file.
1 /*
2  * Copyright 2013 Google Inc.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http:///www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
23 #ifndef PAGESPEED_OPT_HTTP_TWO_LEVEL_PROPERTY_STORE_H_
24 #define PAGESPEED_OPT_HTTP_TWO_LEVEL_PROPERTY_STORE_H_
25 
31 
32 namespace net_instaweb {
33 
34 class PropertyCacheValues;
35 class ThreadSystem;
36 
38  public:
39  TwoLevelPropertyStore(PropertyStore* primary_property_store,
40  PropertyStore* secondary_propery_store,
41  ThreadSystem* thread_system);
42  virtual ~TwoLevelPropertyStore();
43 
47  virtual void Get(
48  const GoogleString& url,
49  const GoogleString& options_signature_hash,
50  const GoogleString& cache_key_suffix,
51  const PropertyCache::CohortVector& cohort_list,
52  PropertyPage* page,
53  BoolCallback* done,
55 
57  virtual void Put(
58  const GoogleString& url,
59  const GoogleString& options_signature_hash,
60  const GoogleString& cache_key_suffix,
61  const PropertyCache::Cohort* cohort,
62  const PropertyCacheValues* values,
63  BoolCallback* done);
64 
65  virtual GoogleString Name() const;
66 
67  private:
68  PropertyStore* primary_property_store_;
69  PropertyStore* secondary_property_store_;
70  ThreadSystem* thread_system_;
71 
72 };
73 
74 }
75 #endif
virtual GoogleString Name() const
Definition: property_cache.h:186
Definition: property_store.h:41
Definition: abstract_property_store_get_callback.h:31
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)
Write to both the storage system for the given key.
Definition: property_cache.h:323
std::string GoogleString
PAGESPEED_KERNEL_BASE_STRING_H_.
Definition: string.h:24
Definition: two_level_property_store.h:37
Definition: thread_system.h:40
Definition: callback.h:44
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)