MediaWiki
REL1_19
|
Handy class for dealing with PoolCounters using class members instead of callbacks. More...
Public Member Functions | |
__construct ($type, $key) | |
doWork () | |
Actually perform the work, caching it if needed. | |
error ($status) | |
Do something with the error, like showing it to the user. | |
execute ($skipcache=false) | |
Get the result of the work (whatever it is), or false. | |
fallback () | |
A work not so good (eg. | |
getCachedWork () | |
Retrieve the work from cache. | |
logError ($status) | |
Log an error. | |
Protected Attributes | |
$cacheable = false |
Handy class for dealing with PoolCounters using class members instead of callbacks.
Definition at line 126 of file PoolCounter.php.
PoolCounterWork::__construct | ( | $ | type, |
$ | key | ||
) |
Definition at line 221 of file PoolCounter.php.
References PoolCounter\factory().
PoolCounterWork::doWork | ( | ) | [abstract] |
Actually perform the work, caching it if needed.
Reimplemented in PoolWorkArticleView.
Referenced by execute().
PoolCounterWork::error | ( | $ | status | ) |
Do something with the error, like showing it to the user.
Reimplemented in PoolWorkArticleView.
Definition at line 154 of file PoolCounter.php.
Referenced by execute().
PoolCounterWork::execute | ( | $ | skipcache = false | ) |
Get the result of the work (whatever it is), or false.
$skipcache | bool |
Definition at line 172 of file PoolCounter.php.
References $result, PoolCounter\DONE, doWork(), PoolCounter\ERROR, error(), fallback(), getCachedWork(), PoolCounter\LOCKED, logError(), Status\newFatal(), PoolCounter\QUEUE_FULL, and PoolCounter\TIMEOUT.
A work not so good (eg.
expired one) but better than an error message.
Reimplemented in PoolWorkArticleView.
Definition at line 147 of file PoolCounter.php.
Referenced by execute().
Retrieve the work from cache.
Reimplemented in PoolWorkArticleView.
Definition at line 138 of file PoolCounter.php.
Referenced by execute().
PoolCounterWork::logError | ( | $ | status | ) |
Log an error.
$status | Status |
Definition at line 163 of file PoolCounter.php.
References wfDebugLog().
Referenced by execute().
PoolCounterWork::$cacheable = false [protected] |
Definition at line 127 of file PoolCounter.php.