Page Speed Optimization Libraries  1.13.35.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
work_bound_expensive_operation_controller.h
Go to the documentation of this file.
1 // Copyright 2015 Google Inc.
16 
17 #ifndef PAGESPEED_CONTROLLER_WORK_BOUND_EXPENSIVE_OPERATION_CONTROLLER_H_
18 #define PAGESPEED_CONTROLLER_WORK_BOUND_EXPENSIVE_OPERATION_CONTROLLER_H_
19 
24 
25 namespace net_instaweb {
26 
36  public:
37  static const char kCurrentExpensiveOperations[];
38 
39  WorkBoundExpensiveOperationController(int max_expensive_operations,
40  Statistics* stats);
42 
44  virtual void ScheduleExpensiveOperation(Function* callback);
45  virtual void NotifyExpensiveOperationComplete();
46 
47  static void InitStats(Statistics* stats);
48 
49  private:
50  bool TryToWork();
51 
52  const int bound_;
53  UpDownCounter* counter_;
54 
55 
56 };
57 
58 }
59 
60 #endif
Definition: work_bound_expensive_operation_controller.h:34
Definition: expensive_operation_controller.h:28
Base class for implementations of monitoring statistics.
Definition: statistics.h:342
Definition: function.h:47
Definition: statistics.h:73
virtual void ScheduleExpensiveOperation(Function *callback)
ExpensiveOperationController interface.