MediaWiki master
Wikimedia\WRStats\ArrayStatsStore Class Reference

In-memory stats store. More...

Inherits Wikimedia\WRStats\StatsStore.

Collaboration diagram for Wikimedia\WRStats\ArrayStatsStore:

Public Member Functions

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

In-memory stats store.

Definition at line 8 of file ArrayStatsStore.php.

Member Function Documentation

◆ delete()

Wikimedia\WRStats\ArrayStatsStore::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 31 of file ArrayStatsStore.php.

◆ getData()

Wikimedia\WRStats\ArrayStatsStore::getData ( )
Returns
array

Definition at line 50 of file ArrayStatsStore.php.

◆ incr()

Wikimedia\WRStats\ArrayStatsStore::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 22 of file ArrayStatsStore.php.

◆ makeKey()

Wikimedia\WRStats\ArrayStatsStore::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 15 of file ArrayStatsStore.php.

◆ query()

Wikimedia\WRStats\ArrayStatsStore::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 37 of file ArrayStatsStore.php.


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