Page Speed Optimization Libraries
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
net_instaweb::ScheduleRewriteController Class Referenceabstract

#include "schedule_rewrite_controller.h"

Inheritance diagram for net_instaweb::ScheduleRewriteController:
net_instaweb::NamedLockScheduleRewriteController net_instaweb::PopularityContestScheduleRewriteController

Public Member Functions

virtual void ScheduleRewrite (const GoogleString &key, Function *callback)=0
virtual void NotifyRewriteComplete (const GoogleString &key)=0
virtual void NotifyRewriteFailed (const GoogleString &key)=0
virtual void ShutDown ()

Detailed Description

Abstract interface class that supports PSOL operations for controlling which rewrites should be run when. Ensures that only one rewrite will run concurrently for each supplied key. For use in CentralController.

Member Function Documentation

virtual void net_instaweb::ScheduleRewriteController::NotifyRewriteComplete ( const GoogleString key)
pure virtual

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.

Implemented in net_instaweb::PopularityContestScheduleRewriteController, and net_instaweb::NamedLockScheduleRewriteController.

virtual void net_instaweb::ScheduleRewriteController::ScheduleRewrite ( const GoogleString key,
Function callback 
pure virtual

Run callback at an indeterminate time in the future when the rewrite for the supplied key should be performed. Will call Cancel immediately if the supplied key is currently in progress. May also call Cancel at some point in the future, for instance if it decides the key isn't worth rewriting.

Implemented in net_instaweb::PopularityContestScheduleRewriteController, and net_instaweb::NamedLockScheduleRewriteController.

virtual void net_instaweb::ScheduleRewriteController::ShutDown ( )

Implementations of this method should try to cancel any pending operations ASAP, and configure the object to immediately reject new incoming ones.

Default implementation does nothing.

Reimplemented in net_instaweb::NamedLockScheduleRewriteController.

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