17 #ifndef PAGESPEED_CONTROLLER_NAMED_LOCK_SCHEDULE_REWRITE_CONTROLLER_H_
18 #define PAGESPEED_CONTROLLER_NAMED_LOCK_SCHEDULE_REWRITE_CONTROLLER_H_
20 #include <unordered_set>
32 #include "pagespeed/kernel/base/thread_annotations.h"
35 namespace net_instaweb {
41 static const char kLocksGranted[];
42 static const char kLocksDenied[];
43 static const char kLocksStolen[];
44 static const char kLocksReleasedWhenNotHeld[];
45 static const char kLocksCurrentlyHeld[];
47 static const int kStealMs;
57 virtual void NotifyRewriteFailed(
const GoogleString& key);
65 LockInfo() : pin_count(0) { }
69 std::unordered_set<Function*> pending_callbacks;
80 typedef rde::hash_map<GoogleString, LockInfo*, CasePreserveStringHash>
84 LOCKS_EXCLUDED(mutex_);
86 LOCKS_EXCLUDED(mutex_);
89 EXCLUSIVE_LOCKS_REQUIRED(mutex_);
90 void DeleteInfoIfUnused(LockInfo* info,
const GoogleString& key)
91 EXCLUSIVE_LOCKS_REQUIRED(mutex_);
95 LockMap locks_ GUARDED_BY(mutex_);
96 bool shut_down_ GUARDED_BY(mutex_);
Non-blocking locking class.
Definition: named_lock_manager.h:31
Definition: named_lock_manager.h:82
Base class for implementations of monitoring statistics.
Definition: statistics.h:342
virtual void ScheduleRewrite(const GoogleString &key, Function *callback)
ScheduleRewriteController interface.
Definition: scoped_ptr.h:30
Definition: function.h:47
std::string GoogleString
PAGESPEED_KERNEL_BASE_STRING_H_.
Definition: string.h:24
Definition: named_lock_schedule_rewrite_controller.h:39
Definition: thread_system.h:40
virtual void NotifyRewriteComplete(const GoogleString &key)
Definition: statistics.h:73
Definition: statistics.h:298
Definition: schedule_rewrite_controller.h:30