MediaWiki  REL1_19
PoolCounterWork Class Reference

Handy class for dealing with PoolCounters using class members instead of callbacks. More...

Inheritance diagram for PoolCounterWork:

List of all members.

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

Detailed Description

Handy class for dealing with PoolCounters using class members instead of callbacks.

Definition at line 126 of file PoolCounter.php.


Constructor & Destructor Documentation

PoolCounterWork::__construct ( type,
key 
)

Definition at line 221 of file PoolCounter.php.

References PoolCounter\factory().

Here is the call graph for this function:


Member Function Documentation

PoolCounterWork::doWork ( ) [abstract]

Actually perform the work, caching it if needed.

Reimplemented in PoolWorkArticleView.

Referenced by execute().

Here is the caller graph for this function:

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().

Here is the caller graph for this function:

PoolCounterWork::execute ( skipcache = false)

Get the result of the work (whatever it is), or false.

Parameters:
$skipcachebool
Returns:
bool|mixed

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.

Here is the call graph for this function:

A work not so good (eg.

expired one) but better than an error message.

Returns:
mixed work result or false

Reimplemented in PoolWorkArticleView.

Definition at line 147 of file PoolCounter.php.

Referenced by execute().

Here is the caller graph for this function:

Retrieve the work from cache.

Returns:
mixed work result or false

Reimplemented in PoolWorkArticleView.

Definition at line 138 of file PoolCounter.php.

Referenced by execute().

Here is the caller graph for this function:

Log an error.

Parameters:
$statusStatus

Definition at line 163 of file PoolCounter.php.

References wfDebugLog().

Referenced by execute().

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

PoolCounterWork::$cacheable = false [protected]

Definition at line 127 of file PoolCounter.php.


The documentation for this class was generated from the following file: