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

#include "queued_expensive_operation_controller.h"

Inheritance diagram for net_instaweb::QueuedExpensiveOperationController:

Public Member Functions

 QueuedExpensiveOperationController (int max_expensive_operations, ThreadSystem *thread_system, Statistics *stats)
virtual void ScheduleExpensiveOperation (Function *callback)
 ExpensiveOperationController interface.
virtual void NotifyExpensiveOperationComplete ()

Static Public Member Functions

static void InitStats (Statistics *stats)

Static Public Attributes

static const char kActiveExpensiveOperations []
static const char kQueuedExpensiveOperations []
static const char kPermittedExpensiveOperations []

Detailed Description

Implements ExpensiveOperationController using a counter and a queue to limit operations in strict order. Note that this implementation does not communicate across process boundaries; It assumes that requests from all workers will be routed to it either by virtue of running in a single process/multi-threaded environment, or through an external RPC system. See WorkBoundExpensiveOperationController for an alternate implementation that does not have this limitation.

Member Function Documentation

virtual void net_instaweb::QueuedExpensiveOperationController::NotifyExpensiveOperationComplete ( )

Inform controller that the operation has been completed. Should only be called if Run() was invoked on callback above.

Implements net_instaweb::ExpensiveOperationController.

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