MediaWiki  1.23.12
PoolCounter_Stub Class Reference
Inheritance diagram for PoolCounter_Stub:
Collaboration diagram for PoolCounter_Stub:

Public Member Functions

 __construct ()
 
 acquireForAnyone ()
 I want to do this task, but if anyone else does it instead, it's also fine for me. More...
 
 acquireForMe ()
 I want to do this task and I need to do it myself. More...
 
 release ()
 I have successfully finished my task. More...
 
- Public Member Functions inherited from PoolCounter
 getKey ()
 

Additional Inherited Members

- Static Public Member Functions inherited from PoolCounter
static factory ( $type, $key)
 Create a Pool counter. More...
 
- Public Attributes inherited from PoolCounter
const DONE = 3
 
const ERROR = -1
 
const LOCK_HELD = -5
 
const LOCKED = 1
 
const NOT_LOCKED = -2
 
const QUEUE_FULL = -3
 
const RELEASED = 2
 
const TIMEOUT = -4
 
- Protected Member Functions inherited from PoolCounter
 __construct ( $conf, $type, $key)
 
- Protected Attributes inherited from PoolCounter
string $key
 All workers with the same key share the lock *. More...
 
 $maxqueue
 
float $timeout
 Maximum time in seconds to wait for the lock *. More...
 
integer $workers
 Maximum number of workers doing the task simultaneously *. More...
 

Detailed Description

Definition at line 123 of file PoolCounter.php.

Constructor & Destructor Documentation

◆ __construct()

PoolCounter_Stub::__construct ( )

Definition at line 124 of file PoolCounter.php.

Member Function Documentation

◆ acquireForAnyone()

PoolCounter_Stub::acquireForAnyone ( )

I want to do this task, but if anyone else does it instead, it's also fine for me.

I will read its cached data.

Returns
Status Value is one of Locked/Done/Error

Reimplemented from PoolCounter.

Definition at line 132 of file PoolCounter.php.

References PoolCounter\LOCKED, and Status\newGood().

◆ acquireForMe()

PoolCounter_Stub::acquireForMe ( )

I want to do this task and I need to do it myself.

Returns
Status Value is one of Locked/Error

Reimplemented from PoolCounter.

Definition at line 128 of file PoolCounter.php.

References PoolCounter\LOCKED, and Status\newGood().

◆ release()

PoolCounter_Stub::release ( )

I have successfully finished my task.

Lets another one grab the lock, and returns the workers waiting on acquireForAnyone()

Returns
Status value is one of Released/NotLocked/Error

Reimplemented from PoolCounter.

Definition at line 136 of file PoolCounter.php.

References Status\newGood(), and PoolCounter\RELEASED.


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