Page Speed Optimization Libraries
1.13.35.1
|
#include "schedule_rewrite_controller.h"
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 () |
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.
|
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.
|
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.
|
inlinevirtual |
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.