Translate extension for MediaWiki
 
Loading...
Searching...
No Matches
DatabaseMessageIndex Class Reference

Storage on the database itself. More...

Inheritance diagram for DatabaseMessageIndex:
MessageIndex

Public Member Functions

 retrieve (bool $readLatest=false)
 
- Public Member Functions inherited from MessageIndex
 getKeys ()
 
 rebuild (float $timestamp=null)
 Creates the index from scratch.
 
 getStatusCacheKey ()
 
 storeInterim (MessageGroup $group, array $newKeys)
 

Protected Member Functions

 lock ()
 
 unlock ()
 
 get ( $key)
 Looks up the stored value for single key.
 
 store (array $array, array $diff)
 
- Protected Member Functions inherited from MessageIndex
 clearMessageGroupStats (array $diff)
 Purge stuff when set of keys have changed.
 
 checkAndAdd (&$hugearray, MessageGroup $g, $ignore=false)
 
 serialize ( $data)
 These are probably slower than serialize and unserialize, but they are more space efficient because we only need strings and arrays.
 
 unserialize ( $data)
 

Protected Attributes

 $index
 
- Protected Attributes inherited from MessageIndex
 $interimCache
 

Additional Inherited Members

- Static Public Member Functions inherited from MessageIndex
static singleton ()
 
static setInstance (self $instance)
 Override the global instance, for testing.
 
static getGroupIds (MessageHandle $handle)
 Retrieves a list of groups given MessageHandle belongs to.
 
static getPrimaryGroupId (MessageHandle $handle)
 
static getArrayDiff (array $old, array $new)
 Compares two associative arrays.
 
- Static Protected Attributes inherited from MessageIndex
static $instance
 

Detailed Description

Storage on the database itself.

This is likely to be the slowest backend. However, it scales okay and provides random access. It also doesn't need any special setup, the database table is added with update.php together with other tables, which is the reason this is the default backend. It also works well on multi-server setup without needing for shared file storage.

Since
2012-04-12

Definition at line 498 of file MessageIndex.php.

Member Function Documentation

◆ get()

DatabaseMessageIndex::get ( $key)
protected

Looks up the stored value for single key.

Only for testing.

Since
2012-04-10
Parameters
string$key
Returns
string|array|null

Reimplemented from MessageIndex.

Definition at line 549 of file MessageIndex.php.

◆ lock()

DatabaseMessageIndex::lock ( )
protected

Reimplemented from MessageIndex.

Definition at line 502 of file MessageIndex.php.

◆ retrieve()

DatabaseMessageIndex::retrieve ( bool $readLatest = false)

Reimplemented from MessageIndex.

Definition at line 534 of file MessageIndex.php.

◆ store()

DatabaseMessageIndex::store ( array $array,
array $diff )
protected

Reimplemented from MessageIndex.

Definition at line 561 of file MessageIndex.php.

◆ unlock()

DatabaseMessageIndex::unlock ( )
protected

Reimplemented from MessageIndex.

Definition at line 515 of file MessageIndex.php.

Member Data Documentation

◆ $index

DatabaseMessageIndex::$index
protected

Definition at line 500 of file MessageIndex.php.


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