1 | <?php |
||
19 | class Memcached extends AbstractStorage { |
||
20 | |||
21 | /** |
||
22 | * @var \Memcached |
||
23 | * The memcached connection. |
||
24 | */ |
||
25 | protected $memcached; |
||
26 | |||
27 | /** |
||
28 | * @var string |
||
29 | * The global key prefix. |
||
30 | */ |
||
31 | protected $prefix; |
||
32 | |||
33 | /** |
||
34 | * Memcached constructor. |
||
35 | * |
||
36 | * @param string $host |
||
37 | * the connection host |
||
38 | * @param int $port |
||
39 | * the connection port, default 11211 |
||
40 | * @param string $prefix |
||
41 | * the global key prefix to use, default 'PHPProm:' |
||
42 | */ |
||
43 | public function __construct($host, $port = 11211, $prefix = 'PHPProm:') { |
||
49 | |||
50 | /** |
||
51 | * {@inheritdoc} |
||
52 | */ |
||
53 | public function storeMeasurement($metric, $key, $value) { |
||
56 | |||
57 | /** |
||
58 | * {@inheritdoc} |
||
59 | */ |
||
60 | public function incrementMeasurement($metric, $key) { |
||
70 | |||
71 | /** |
||
72 | * {@inheritdoc} |
||
73 | */ |
||
74 | public function getMeasurements($metric, array $keys, $defaultValue = 'Nan') { |
||
88 | } |
||
89 |