Debian Codegraph @

includes/libs/Stats/IBufferingStatsdDataFactory.php

raw symbols SCIP
1 <?php
2
3 namespace Wikimedia\Stats;
4
5 use Liuggio\StatsdClient\Entity\StatsdData;
6 use Liuggio\StatsdClient\Factory\StatsdDataFactoryInterface;
7
8 /**
9 * MediaWiki adaptation of StatsdDataFactory that provides buffering functionality.
10 *
11 * @stable to implement
12 * @since 1.30
13 * @see BufferingStatsdDataFactory
14 */
15 interface IBufferingStatsdDataFactory extends StatsdDataFactoryInterface {
16 /**
17 * Check whether this data factory has any buffered data.
18 * @return bool
19 */
20 public function hasData();
21
22 /**
23 * Return the buffered data from the factory.
24 * @return StatsdData[]
25 */
26 public function getData();
27
28 /**
29 * Clear all buffered data from the factory
30 * @since 1.31
31 */
32 public function clearData();
33
34 /**
35 * Return the number of buffered statsd data entries
36 * @return int
37 * @since 1.31
38 */
39 public function getDataCount();
40
41 /**
42 * Set collection enable status.
43 * @param bool $enabled Will collection be enabled?
44 * @return void
45 */
46 public function setEnabled( $enabled );
47 }
48
49 /** @deprecated class alias since 1.43 */
50 class_alias( IBufferingStatsdDataFactory::class, 'IBufferingStatsdDataFactory' );