MediaWiki
1.23.2
|
Class for dealing with PoolCounters using class members. More...
Public Member Functions | |
__construct ( $type, $key) | |
doWork () | |
Actually perform the work, caching it if needed. More... | |
error ( $status) | |
Do something with the error, like showing it to the user. More... | |
execute ( $skipcache=false) | |
Get the result of the work (whatever it is), or the result of the error() function. More... | |
fallback () | |
A work not so good (eg. More... | |
getCachedWork () | |
Retrieve the work from cache. More... | |
logError ( $status) | |
Log an error. More... | |
Protected Attributes | |
$cacheable = false | |
Class for dealing with PoolCounters using class members.
Definition at line 27 of file PoolCounterWork.php.
PoolCounterWork::__construct | ( | $type, | |
$key | |||
) |
string | $type | The type of PoolCounter to use |
string | $key | Key that identifies the queue this work is placed on |
Definition at line 34 of file PoolCounterWork.php.
References $type, and PoolCounter\factory().
|
abstract |
Actually perform the work, caching it if needed.
Reimplemented in PoolWorkArticleView, and PoolCounterWorkViaCallback.
Referenced by execute().
PoolCounterWork::error | ( | $status | ) |
Do something with the error, like showing it to the user.
Reimplemented in PoolWorkArticleView, and PoolCounterWorkViaCallback.
Definition at line 65 of file PoolCounterWork.php.
Referenced by execute().
PoolCounterWork::execute | ( | $skipcache = false | ) |
Get the result of the work (whatever it is), or the result of the error() function.
This returns the result of the first applicable method that returns a non-false value, where the methods are checked in the following order:
$skipcache | bool |
Definition at line 97 of file PoolCounterWork.php.
References array(), PoolCounter\DONE, doWork(), PoolCounter\ERROR, error(), fallback(), getCachedWork(), PoolCounter\LOCKED, logError(), Status\newFatal(), PoolCounter\QUEUE_FULL, and PoolCounter\TIMEOUT.
PoolCounterWork::fallback | ( | ) |
A work not so good (eg.
expired one) but better than an error message.
Reimplemented in PoolWorkArticleView, and PoolCounterWorkViaCallback.
Definition at line 57 of file PoolCounterWork.php.
Referenced by execute().
PoolCounterWork::getCachedWork | ( | ) |
Retrieve the work from cache.
Reimplemented in PoolWorkArticleView, and PoolCounterWorkViaCallback.
Definition at line 48 of file PoolCounterWork.php.
Referenced by execute().
PoolCounterWork::logError | ( | $status | ) |
Log an error.
$status | Status |
Definition at line 75 of file PoolCounterWork.php.
References wfDebugLog().
Referenced by execute().
|
protected |
Definition at line 28 of file PoolCounterWork.php.