MediaWiki master
Wikimedia\WRStats\BagOStuffStatsStore Class Reference

An adaptor allowing WRStats to store data in MediaWiki's BagOStuff. More...

Inherits Wikimedia\WRStats\StatsStore.

Collaboration diagram for Wikimedia\WRStats\BagOStuffStatsStore:

Public Member Functions

 __construct (BagOStuff $cache)
 
 delete (array $keys)
 Perform a batch of delete operations.
 
 incr (array $values, $ttl)
 Perform a batch of increment operations.
 
 makeKey ( $prefix, $internals, $entity)
 Construct a string key from its components.
Parameters
string[]$prefixThe prefix components.
array<string|int>$internals The internal components.
EntityKey$entityThe entity components. If $entity->isGlobal() is true, the key as a whole should be treated as global.
Returns
string

 
 query (array $keys)
 Perform a batch of fetch operations.
 

Detailed Description

An adaptor allowing WRStats to store data in MediaWiki's BagOStuff.

Stability: newable
Since
1.39

Definition at line 13 of file BagOStuffStatsStore.php.

Constructor & Destructor Documentation

◆ __construct()

Wikimedia\WRStats\BagOStuffStatsStore::__construct ( BagOStuff  $cache)
Parameters
BagOStuff$cache

Definition at line 20 of file BagOStuffStatsStore.php.

Member Function Documentation

◆ delete()

Wikimedia\WRStats\BagOStuffStatsStore::delete ( array  $keys)

Perform a batch of delete operations.

Parameters
string[]$keysKeys to delete; strings returned by makeKey()

Implements Wikimedia\WRStats\StatsStore.

Definition at line 50 of file BagOStuffStatsStore.php.

◆ incr()

Wikimedia\WRStats\BagOStuffStatsStore::incr ( array  $values,
  $ttl 
)

Perform a batch of increment operations.

Parameters
int[]$valuesThe deltas to add, indexed by the key as returned by makeKey()
int$ttlThe expiry time of any new entries, in seconds. This is a hint, allowing the storage layer to control space usage. Implementing expiry is not a requirement.

Implements Wikimedia\WRStats\StatsStore.

Definition at line 38 of file BagOStuffStatsStore.php.

◆ makeKey()

Wikimedia\WRStats\BagOStuffStatsStore::makeKey (   $prefix,
  $internals,
  $entity 
)

Construct a string key from its components.

Parameters
string[]$prefixThe prefix components.
array<string|int>$internals The internal components.
EntityKey$entityThe entity components. If $entity->isGlobal() is true, the key as a whole should be treated as global.
Returns
string

Implements Wikimedia\WRStats\StatsStore.

Definition at line 28 of file BagOStuffStatsStore.php.

◆ query()

Wikimedia\WRStats\BagOStuffStatsStore::query ( array  $keys)

Perform a batch of fetch operations.

Parameters
string[]$keysKeys to get; strings returned by makeKey()
Returns
int[] Integers

Implements Wikimedia\WRStats\StatsStore.

Definition at line 54 of file BagOStuffStatsStore.php.


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