1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 package org.apache.commons.monitoring.repositories;
19
20 import org.apache.commons.monitoring.Role;
21 import org.apache.commons.monitoring.configuration.Configuration;
22 import org.apache.commons.monitoring.counters.Counter;
23 import org.apache.commons.monitoring.gauges.Gauge;
24 import org.apache.commons.monitoring.stopwatches.StopWatch;
25
26 import java.util.Map;
27
28 public interface Repository extends Iterable<Counter> {
29 static final Repository INSTANCE = Configuration.newInstance(Repository.class);
30
31 Counter getCounter(Counter.Key key);
32 void clear();
33 StopWatch start(Counter counter);
34
35 void addGauge(final Gauge gauge);
36 void stopGauge(Role role);
37 Map<Long, Double> getGaugeValues(long start, long end, Role role);
38 }