MediaWiki
master
PoolCounterNull.php
Go to the documentation of this file.
1
<?php
21
namespace
MediaWiki\PoolCounter
;
22
23
use
MediaWiki\Status\Status
;
24
31
class
PoolCounterNull
extends
PoolCounter
{
32
33
public
function
__construct
() {
34
// No parameters needed
35
}
36
37
public
function
acquireForMe
(
$timeout
=
null
) {
38
return
Status::newGood(
PoolCounter::LOCKED
);
39
}
40
41
public
function
acquireForAnyone
(
$timeout
=
null
) {
42
return
Status::newGood(
PoolCounter::LOCKED
);
43
}
44
45
public
function
release
() {
46
return
Status::newGood(
PoolCounter::RELEASED
);
47
}
48
}
49
51
class_alias( PoolCounterNull::class,
'PoolCounterNull'
);
MediaWiki\PoolCounter\PoolCounterNull
A default PoolCounter, which provides no locking.
Definition
PoolCounterNull.php:31
MediaWiki\PoolCounter\PoolCounterNull\__construct
__construct()
Definition
PoolCounterNull.php:33
MediaWiki\PoolCounter\PoolCounterNull\release
release()
I have successfully finished my task.
Definition
PoolCounterNull.php:45
MediaWiki\PoolCounter\PoolCounterNull\acquireForAnyone
acquireForAnyone( $timeout=null)
I want to do this task, but if anyone else does it instead, it's also fine for me.
Definition
PoolCounterNull.php:41
MediaWiki\PoolCounter\PoolCounterNull\acquireForMe
acquireForMe( $timeout=null)
I want to do this task and I need to do it myself.
Definition
PoolCounterNull.php:37
MediaWiki\PoolCounter\PoolCounter
Semaphore semantics to restrict how many workers may concurrently perform a task.
Definition
PoolCounter.php:56
MediaWiki\PoolCounter\PoolCounter\LOCKED
const LOCKED
Definition
PoolCounter.php:58
MediaWiki\PoolCounter\PoolCounter\$timeout
int $timeout
Maximum time in seconds to wait for the lock.
Definition
PoolCounter.php:82
MediaWiki\PoolCounter\PoolCounter\RELEASED
const RELEASED
Definition
PoolCounter.php:59
MediaWiki\Status\Status
Generic operation result class Has warning/error list, boolean status and arbitrary value.
Definition
Status.php:54
MediaWiki\PoolCounter
Definition
PoolCounter.php:21
includes
poolcounter
PoolCounterNull.php
Generated on Sat Dec 21 2024 11:25:08 for MediaWiki by
1.10.0