19 #ifndef PAGESPEED_KERNEL_CACHE_ASYNC_CACHE_H_
20 #define PAGESPEED_KERNEL_CACHE_ASYNC_CACHE_H_
28 #include "pagespeed/kernel/cache/cache_interface.h"
31 namespace net_instaweb {
68 virtual void MultiGet(MultiGetRequest* request);
88 return !stopped_.value() && cache_->
IsHealthy();
91 int32 outstanding_operations() {
return outstanding_operations_.
value(); }
101 void DoMultiGet(MultiGetRequest* request);
102 void CancelMultiGet(MultiGetRequest* request);
106 void DoPut(
GoogleString* key,
const SharedString value);
107 void CancelPut(
GoogleString* key,
const SharedString value);
111 void MultiGetReportNotFound(MultiGetRequest* request);
113 CacheInterface* cache_;
114 QueuedWorkerPool::Sequence* sequence_;
116 AtomicInt32 outstanding_operations_;
void CancelPendingOperations()
Definition: async_cache.h:85
virtual void Put(const GoogleString &key, const SharedString &value)
Abstract interface for a cache.
Definition: cache_interface.h:32
virtual bool IsHealthy() const
Definition: async_cache.h:87
virtual void MultiGet(MultiGetRequest *request)
std::string GoogleString
PAGESPEED_KERNEL_BASE_STRING_H_.
Definition: string.h:24
AsyncCache(CacheInterface *cache, QueuedWorkerPool *pool)
virtual bool IsBlocking() const
Definition: async_cache.h:71
Definition: async_cache.h:39
Definition: queued_worker_pool.h:50
virtual bool IsHealthy() const =0
Definition: shared_string.h:40
Definition: cache_interface.h:42
int32 value() const
Return the value currently stored. Has acquire semantics (see above).
Definition: atomic_int32.h:83
virtual GoogleString Name() const
Definition: async_cache.h:70
virtual GoogleString Name() const =0
void CancelPendingFunctions() LOCKS_EXCLUDED(sequence_mutex_)
Calls Cancel on all pending functions in the queue.
static const int64 kMaxQueueSize
Definition: async_cache.h:53
virtual void Get(const GoogleString &key, Callback *callback)