MediaWiki REL1_39
Wikimedia\WRStats\StatsStore Interface Reference

The narrow interface WRStats needs into a memcached-like key-value store. More...

Inheritance diagram for Wikimedia\WRStats\StatsStore:

Public Member Functions

 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.
 
 query (array $keys)
 Perform a batch of fetch operations.
 

Detailed Description

The narrow interface WRStats needs into a memcached-like key-value store.

Since
1.39

Definition at line 10 of file StatsStore.php.

Member Function Documentation

◆ delete()

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

Perform a batch of delete operations.

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

Implemented in Wikimedia\WRStats\ArrayStatsStore, and Wikimedia\WRStats\BagOStuffStatsStore.

◆ incr()

Wikimedia\WRStats\StatsStore::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.

Implemented in Wikimedia\WRStats\ArrayStatsStore, and Wikimedia\WRStats\BagOStuffStatsStore.

◆ makeKey()

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

Construct a string key from its components.

Parameters
array$prefixThe prefix components.
array$internalsThe internal components.
EntityKey$entityThe entity components. If $entity->isGlobal() is true, the key as a whole should be treated as global.
Returns
string

Implemented in Wikimedia\WRStats\ArrayStatsStore, and Wikimedia\WRStats\BagOStuffStatsStore.

◆ query()

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

Perform a batch of fetch operations.

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

Implemented in Wikimedia\WRStats\ArrayStatsStore, and Wikimedia\WRStats\BagOStuffStatsStore.


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