Go to the documentation of this file.
48 abstract public function doWork();
85 $key = $this->poolCounter->getKey();
87 wfDebugLog(
'poolcounter',
"Pool key '$key' ({$this->type}): "
88 .
$status->getMessage()->inLanguage(
'en' )->useDatabase(
false )->text() );
106 public function execute( $skipcache =
false ) {
107 if ( $this->cacheable && !$skipcache ) {
108 $status = $this->poolCounter->acquireForAnyone();
110 $status = $this->poolCounter->acquireForMe();
125 $result = $this->
doWork();
126 $this->poolCounter->release();
131 if ( $result ===
false ) {
143 if ( $result !==
false ) {
fallback()
A work not so good (eg.
static newFatal( $message,... $parameters)
Factory function for fatal errors.
__construct( $type, $key)
doWork()
Actually perform the work, caching it if needed.
wfDebugLog( $logGroup, $text, $dest='all', array $context=[])
Send a line to a supplementary debug log file, if configured, or main debug log if not.
When you have many workers (threads/servers) giving service, and a cached item expensive to produce e...
execute( $skipcache=false)
Get the result of the work (whatever it is), or the result of the error() function.
getCachedWork()
Retrieve the work from cache.
static factory( $type, $key)
Create a Pool counter.
error( $status)
Do something with the error, like showing it to the user.
Class for dealing with PoolCounters using class members.
logError( $status)
Log an error.