. * * @package LibreNMS * @link http://librenms.org * @copyright 2020 Tony Murray * @author Tony Murray */ namespace LibreNMS\Data\Store; use LibreNMS\Data\Measure\Measurement; use LibreNMS\Data\Measure\MeasurementCollection; use LibreNMS\Interfaces\Data\Datastore as DatastoreContract; abstract class BaseDatastore implements DatastoreContract { private $stats; public function __construct() { $this->stats = new MeasurementCollection(); } /** * Checks if the datastore wants rrdtags to be sent when issuing put() * * @return bool */ public function wantsRrdTags() { return true; } /** * Record statistics for operation * @param Measurement $stat */ protected function recordStatistic(Measurement $stat) { $this->stats->record($stat); } public function getStats() { return $this->stats; } }