MediaWiki
REL1_21
|
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 147 of file PoolCounter.php.
PoolCounterWork::__construct | ( | $ | type, |
$ | key | ||
) |
Definition at line 243 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 176 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 194 of file PoolCounter.php.
References $result, array(), 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 168 of file PoolCounter.php.
Referenced by execute().
Retrieve the work from cache.
Reimplemented in PoolWorkArticleView.
Definition at line 159 of file PoolCounter.php.
Referenced by execute().
PoolCounterWork::logError | ( | $ | status | ) |
Log an error.
$status | Status |
Definition at line 185 of file PoolCounter.php.
References wfDebugLog().
Referenced by execute().
PoolCounterWork::$cacheable = false [protected] |
Definition at line 148 of file PoolCounter.php.