* @author Addshore
* @since 1.27
*/
-class NullStatsdDataFactory implements StatsdDataFactoryInterface {
+class NullStatsdDataFactory implements IBufferingStatsdDataFactory {
/**
* This function creates a 'timing' StatsdData.
* This function creates a 'increment' StatsdData object.
*
* @param string|array $key The metric(s) to increment.
- * @param float|1 $sampleRate The rate (0-1) for sampling.
*
* @return array
*/
*
*
* @param string|array $key The metric(s) to decrement.
- * @param float|1 $sampleRate The rate (0-1) for sampling.
*
* @return mixed
*/
* This function creates a 'updateCount' StatsdData object.
*
* @param string|array $key The metric(s) to decrement.
- * @param integer $delta The delta to add to the each metric
+ * @param int $delta The delta to add to the each metric
*
* @return mixed
*/
return $data;
}
+ /**
+ * Check whether this data factory has any data.
+ * @return bool
+ */
+ public function hasData() {
+ return false;
+ }
+
+ /**
+ * Return data from the factory.
+ * @return StatsdData[]
+ */
+ public function getData() {
+ return [];
+ }
+
+ /**
+ * Set collection enable status.
+ * @param bool $enabled Will collection be enabled?
+ * @return void
+ */
+ public function setEnabled( $enabled ) {
+ // Nothing to do, null factory is always disabled.
+ }
}