Page Speed Optimization Libraries  1.13.35.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Public Member Functions | Static Public Member Functions | Static Public Attributes | Friends | List of all members
net_instaweb::PopularityContestScheduleRewriteController Class Reference
Inheritance diagram for net_instaweb::PopularityContestScheduleRewriteController:
net_instaweb::ScheduleRewriteController

Public Member Functions

 PopularityContestScheduleRewriteController (ThreadSystem *thread_system, Statistics *statistics, Timer *timer, int max_running_rewrites, int max_queued_rewrites)
 
void ScheduleRewrite (const GoogleString &key, Function *callback) override
 ScheduleRewriteController interface.
 
void NotifyRewriteComplete (const GoogleString &key) override
 
void NotifyRewriteFailed (const GoogleString &key) override
 
- Public Member Functions inherited from net_instaweb::ScheduleRewriteController
virtual void ShutDown ()
 

Static Public Member Functions

static void InitStats (Statistics *stats)
 

Static Public Attributes

static const char kNumRewritesRequested []
 
static const char kNumRewritesSucceeded []
 
static const char kNumRewritesFailed []
 
static const char kNumRewritesRejectedQueueSize []
 
static const char kNumRewritesRejectedInProgress []
 
static const char kRewriteQueueSize []
 
static const char kNumRewritesRunning []
 
static const char kNumRewritesAwaitingRetry []
 

Friends

class PopularityContestScheduleRewriteControllerTest
 

Constructor & Destructor Documentation

net_instaweb::PopularityContestScheduleRewriteController::PopularityContestScheduleRewriteController ( ThreadSystem thread_system,
Statistics statistics,
Timer timer,
int  max_running_rewrites,
int  max_queued_rewrites 
)

max_running_rewrites and max_queued_rewrites are CHECKed to be > 0. Since max_running_rewrites is implicity bounded by the queue size, you probably want queued >= running, but this isn't enforced by the code.

Member Function Documentation

void net_instaweb::PopularityContestScheduleRewriteController::NotifyRewriteComplete ( const GoogleString key)
overridevirtual

Inform controller that the rewrite has been completed. Should only be called if Run() was invoked on callback above. Controller implemenations may wish to behave differently depending on success or failure of the result, for instance by retrying failures ASAP. Failure should not be used in the case of permanent failure, such as a badly formed input.

Implements net_instaweb::ScheduleRewriteController.


The documentation for this class was generated from the following file: