summaryrefslogtreecommitdiff
path: root/www/wiki/includes/libs/stats/IBufferingStatsdDataFactory.php
blob: 77b4c3528a226b998ab1a348d7aa02186f5ea229 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?php
use Liuggio\StatsdClient\Entity\StatsdData;
use Liuggio\StatsdClient\Factory\StatsdDataFactoryInterface;

/**
 * MediaWiki adaptation of StatsdDataFactory that provides buffering functionality.
 *
 * @see BufferingStatsdDataFactory
 */
interface IBufferingStatsdDataFactory extends StatsdDataFactoryInterface {
	/**
	 * Check whether this data factory has any buffered data.
	 * @return bool
	 */
	public function hasData();

	/**
	 * Return the buffered data from the factory.
	 * @return StatsdData[]
	 */
	public function getData();

	/**
	 * Clear all buffered data from the factory
	 * @since 1.31
	 */
	public function clearData();

	/**
	 * Return the number of buffered statsd data entries
	 * @return int
	 * @since 1.31
	 */
	public function getDataCount();

	/**
	 * Set collection enable status.
	 * @param bool $enabled Will collection be enabled?
	 * @return void
	 */
	public function setEnabled( $enabled );
}