Page Speed Optimization Libraries
1.13.35.1
|
#include "statistics.h"
Public Member Functions | |
int64 | Get () const |
void | Set (int64 value) |
int64 | SetReturningPreviousValue (int64 value) |
int64 | AddHelper (int64 delta) |
Protected Member Functions | |
virtual AbstractMutex * | mutex () const =0 |
virtual int64 | GetLockHeld () const =0 |
Get/Setters that may only be called if you already hold the mutex. | |
virtual int64 | SetReturningPreviousValueLockHeld (int64 value)=0 |
void | SetLockHeld (int64 value) |
int64 | AddLockHeld (int64 delta) |
Friends | |
class | StatisticsLogger |
Scalar value protected by a mutex. Mutex must fully protect access to underlying scalar. For example, in mod_pagespeed and ngx_pagespeed, variables are stored in shared memory and accessible from any process on a machine, so the mutex must provide protection across separate processes.
StatisticsLogger depends upon these mutexes being cross-process so that several processes using the same file system don't clobber each others logs.
int64 net_instaweb::MutexedScalar::Get | ( | ) | const |
Subclasses should not define these methods, instead define the *LockHeld() methods below.
|
protected |
These are implemented based on GetLockHeld() and SetReturningPreviousLockHeld().